On Mon, 2002-07-15 at 16:07, Martijn van Oosterhout wrote:
> On Mon, Jul 15, 2002 at 03:47:28PM +0200, Adrian 'Dagurashibanipal' von Bidder wrote:
> > On Sun, 2002-07-14 at 03:59, Eugene wrote:
> > [ SERIAL type / SEQUENCEs and transactions ]
> >
> > Closely related: what's the official/preferred way if I'm inserting rows
> > into a table with a auto assigned id (SERIAL), to get the newly created
> > id? asking the sequence obviously will not work - as the sequence will
> > advance when the next value is inserted from another transaction.
>
> You read the documentation and notice that currval() is not affected by
> nextval()s executed upon other connections. In other words, it's a complete
> non-issue and works exectly the way that is useful.
Ok, thanks (and sorry for not rtfm in this case). Unexpected, but, yes,
useful.
cheers
-- vbi
--
secure email with gpg http://fortytwo.ch/gpg