Re: Using oid as pkey

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Using oid as pkey
Дата
Msg-id 20070820231059.GF27916@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Using oid as pkey  ("D. Dante Lorenso" <dante@lorenso.com>)
Список pgsql-general
D. Dante Lorenso wrote:

> I want the value of col0 returned to the application and I don't want to
> know the name of the sequence involved in the SERIAL column.  I just want
> the value inserted into the column by using just it's column name.

Use pg_get_serial_sequence().  Don't use lastval() if you can help it,
because it's a foot gun.

--
Alvaro Herrera                 http://www.amazon.com/gp/registry/DXLWNGRJD34J
"I love the Postgres community. It's all about doing things _properly_. :-)"
(David Garamond)

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

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Using oid as pkey
Следующее
От: Rainer Bauer
Дата:
Сообщение: Re: Using oid as pkey