Re: SERIAL problems? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SERIAL problems?
Date
Msg-id 23436.1149629297@sss.pgh.pa.us
Whole thread Raw
In response to SERIAL problems?  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
List pgsql-hackers
Zoltan Boszormenyi <zboszor@dunaweb.hu> writes:
> What are the "existing problems"?

Please read the archives; this has been discussed recently.
There's a lot of disagreement about what ALTER should allow
and what pg_dump should do with an altered sequence.

> I am asking because I am experimenting to implement
> the SQL2003 compliant form for the serial type
> to be able specify the underlying sequence
> parameters:

Be aware that the big problem with SQL2003 is that it expects an
"action at a distance" behavior whereby different references to a
generator all return the same result if executed within the same
query cycle.  This makes the construct not equivalent to either
nextval() or currval(), but some hybrid with hidden state; and
changing of that state would have to tie into core parts of the
executor.  It looks pretty messy :-(
        regards, tom lane


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: That EXPLAIN ANALYZE patch still needs work
Next
From: Tom Lane
Date:
Subject: Re: That EXPLAIN ANALYZE patch still needs work