From: | "A B" <gentosaker(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Reuse serial numbers? |
Date: | 2008-03-27 10:17:51 |
Message-ID: | dbbf25900803270317g7e87b015lbf1f228fdb533715@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Oh, I just thought of having a boolean field for indicating usage...I
don't know if it will be more efficient. But as a novice... I think
that will be sufficient.
2008/3/27, Emil Obermayr <nobs(at)nobswolf(dot)info>:
> On Thu, Mar 27, 2008 at 10:49:06AM +0100, A. Kretschmer wrote:
> >
> > Why do you think you need the numbers?
>
>
> A typical application for low numbers (not letting them increase over
> time) is the "human readabilitly" if you need them outside the DB as
> labels on boxes for "real life transactions".
>
> One solution is writing a function using a self join on the column
> on a.n + 1 = b.n searching for NULL results; then returning the a.n+1.
>
> I have this somewhere in the jungle of my source code snippets. Tell me
> if you need me searching for it :)
>
>
> Emil
>
>
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>
From | Date | Subject | |
---|---|---|---|
Next Message | nick | 2008-03-27 10:21:43 | Restoring DB using Continuous Archive Backup |
Previous Message | Emil Obermayr | 2008-03-27 10:06:24 | Re: Reuse serial numbers? |