From: | Jack Brown <zidibik(at)yahoo(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: creating "a perfect sequence" column |
Date: | 2008-07-07 11:54:45 |
Message-ID: | 340545.10860.qm@web63909.mail.re1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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. until then, 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
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Broersma | 2008-07-07 12:23:49 | Re: creating "a perfect sequence" column |
Previous Message | Ow Mun Heng | 2008-07-07 09:53:58 | Altering a column type w/o dropping views |