Re: Retrieving PK of inserted row

Поиск
Список
Период
Сортировка
От cedric
Тема Re: Retrieving PK of inserted row
Дата
Msg-id 200701301230.05767.cedric@over-blog.com
обсуждение исходный текст
Ответ на Retrieving PK of inserted row  ("woger151" <woger151@jqpx37.cotse.net>)
Список pgsql-general
Le mardi 30 janvier 2007 12:19, woger151 a écrit :
> (3) Use LASTVAL
for this one : look at
http://people.planetpostgresql.org/xzilla/index.php?/archives/169-Is-lastval-evil.html
>
> My questions:
> * Are any of these methods flawed?
> * Is there any reason to prefer (1) to (2)?
> * I'm not sure whether LASTVAL is guaranteed to work outside of a
> transaction.  Its description in the 8.1 manual starts with "Return the
> value most recently returned by nextval in the current session. ..." but
> I'm not sure of the formal sense in which "session" is being used.  (I'm
> connecting to the DB from mod_php in apache, so I guess "session" could
> mean "during the existence of a given db connection," but I'm not sure.)

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

Предыдущее
От: "Willy-Bas Loos"
Дата:
Сообщение: Re: Unauthorized users can see db schema and read functions
Следующее
От: Florian Weimer
Дата:
Сообщение: Foreign keys, table inheritance, and TRUNCATE