Re: [HACKERS] Get OID of just inserted record

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Get OID of just inserted record
Дата
Msg-id 16487.941570041@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Get OID of just inserted record  ("Aaron J. Seigo" <aaron@gtv.ca>)
Список pgsql-hackers
"Aaron J. Seigo" <aaron@gtv.ca> writes:
> would it be possible to add a RETURN clause to INSERT? e.g.
>
> INSERT into t1 VALUES('xxx') RETURN oid;

Not necessary --- the backend already does return the OID of the
inserted tuple (if just one is inserted).  You can see it in psql,
for example.  The problem here is just that not all frontend libraries
make it possible to get at that value :-(.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] file descriptors leak?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] file descriptors leak?