Re: SERIAL behaviour

Поиск
Список
Период
Сортировка
От Adrian 'Dagurashibanipal' von Bidder
Тема Re: SERIAL behaviour
Дата
Msg-id 1026743373.15937.1.camel@atlas
обсуждение исходный текст
Ответ на Re: SERIAL behaviour  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
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

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Weird (?) happenings with locks and limits?
Следующее
От: terry@greatgulfhomes.com
Дата:
Сообщение: Re: help (maybe i'm a little stupid)