Re: creating "a perfect sequence" column - Mailing list pgsql-general

From Jack Brown
Subject Re: creating "a perfect sequence" column
Date
Msg-id 340545.10860.qm@web63909.mail.re1.yahoo.com
Whole thread Raw
In response to Re: creating "a perfect sequence" column  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Responses Re: creating "a perfect sequence" column
Re: creating "a perfect sequence" column
List pgsql-general
> On Sun, Jul 6, 2008 at 7:33 PM, Berend Tober wrote:
> > This question comes up a lot. A term used in prior
> discussions is "gapless
> > sequence".
> >
>
Thank you, i didn't know the term so when I'd searched the archives, i hadn't found much.

> > What would be really more interesting for discussion
> on this community forum
> > is a detailed description or your actual use case and
> requirements.
>
it's sort of a formal document management system. the assigned gapless numbers are frozen at the end of each month.
untilthen, an authorized user will be able to delete a document. but ... 

> reusing numbers
> already shown to
> a user is a recipe for a disaster.  they write down the
> number, and
> two weeks later reference it, but it's not there.
>
... when I mentioned them (management) this, they accepted that this was not a really good idea after all, thanks a lot
:)i will assign numbers when closing the month, so everything will be fine. 

in the mean time i did some research for other rdbms and i guess, what i was looking for was more along the lines of
e.g.the row_number() function of mssql [1]. fwiw this seems like the most efficient pagination solution, assuming, of
course,the rdbms implements this functionality efficiently. 

[1]: http://www.davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx




pgsql-general by date:

Previous
From: Ow Mun Heng
Date:
Subject: Altering a column type w/o dropping views
Next
From: "Richard Broersma"
Date:
Subject: Re: creating "a perfect sequence" column