Re: getting back autonumber just inserted

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: getting back autonumber just inserted
Дата
Msg-id 20050707191510.GC11800@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: getting back autonumber just inserted  (mail TechEvolution <mail@techevolution.be>)
Список pgsql-sql
On Thu, Jul 07, 2005 at 08:21:12PM +0200, mail TechEvolution wrote:
> hi Alvaro Herrera
> 
> >>You use the currval() function, using the name of the involved sequence
> >>as parameter.  There is a pg_get_serial_sequence() function, to which
> >>you give the table name and column name
> 
> thx for the information
> 
> and is there a function i can use to get the last added autonumber without 
> knowing wich table or row? (exactly as select @@ IDENTITY does?) i have 
> read in the messages that there must be such a function for version 8.0, 
> but i could not find it in the documentation, any idea on it?

There is no such function in 8.0.  There will be in 8.1, however.

-- 
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"El hombre nunca sabe de lo que es capaz hasta que lo intenta" (C. Dickens)


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

Предыдущее
От: mail TechEvolution
Дата:
Сообщение: Re: getting back autonumber just inserted
Следующее
От: Theodore Petrosky
Дата:
Сообщение: Re: getting back autonumber just inserted