Re: Last ID

Поиск
Список
Период
Сортировка
Искать
От
Brett W. McCoy
Тема
Re: Last ID
Дата
Msg-id
Pine.LNX.4.30.0103021351090.22539-100000@chapelperilous.net
Ответ на
Re: Last ID (Catalin CIOCOIU)
Список
Дерево обсуждения
Re: Last ID Catalin CIOCOIU <catalin.ciocoiu@inpg.fr>
Re: Last ID "Brett W. McCoy" <bmccoy@chapelperilous.net>
On Fri, 2 Mar 2001, Catalin CIOCOIU wrote:

> 	This method don't encourage using serial data type. Practically, in the
> joined table I can't use "serial" data type for primary key. I nead to
> use sequences by hand.
> 	The last solution work fine, but I need a variable for store the
> nextval('').
>
> There is not a other solution ?

It turns out I was wrong -- using currval is session-based, as Tom Lane
has pointed out.  However, still see the notes in the docs on caching
more than one values for each backend.  This may or not be pertinent.

-- Brett
                                     http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
While money doesn't buy love, it puts you in a great bargaining position.

В списке pgsql-novice по дате отправления
От: Chuck Kimber
Дата:
Сообщение: RE: Last ID
От: Donald Braman
Дата:
Сообщение: www.postgresql.org
FAQ