Re: [PATCHES] Non-colliding auto generated names - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: [PATCHES] Non-colliding auto generated names
Date
Msg-id 1046893624.19527.59.camel@jester
Whole thread Raw
In response to Re: [PATCHES] Non-colliding auto generated names  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [PATCHES] Non-colliding auto generated names
Re: [PATCHES] Non-colliding auto generated names
List pgsql-hackers
On Wed, 2003-03-05 at 14:37, Bruce Momjian wrote:
> Interesting idea.  The bigger problem is that apps who use the sequence
> name also would have problems running after the restore.  Seems we need
> column.nextval() so you can increment the sequence without knowing the
> sequence name, just the column name.  Of course, this related to this
> TODO item:
>
>     * Have sequence dependency track use of DEFAULT sequences,
>       seqname.nextval

200N spec proposes 'NEXT VALUE FOR <sequence>'.

Tom will shoot me if I submit that though (VALUE as a keyword again).  I
suppose one could make it a variable, and confirm it's value is VALUE?

Other than that it should be a fairly simple task.


Anyway, once again we could extend to include:

NEXT VALUE ON table(column)?


An application that was simply interested in the next value of a table
column could simply evaluate the default value -- which should be easily
retrievable and more portable in most interfaces (jdbc, odbc, etc.).

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Non-colliding auto generated names
Next
From: mlw
Date:
Subject: Re: Best setup for RAM drive