Re: how to determine OID of the row I just inserted???

Поиск
Список
Период
Сортировка
От Jules Alberts
Тема Re: how to determine OID of the row I just inserted???
Дата
Msg-id 20030207075408.0A2471CB1B9@koshin.dsl.systemec.nl
обсуждение исходный текст
Ответ на Re: how to determine OID of the row I just inserted???  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Op 6 Feb 2003 (10:08), schreef Tom Lane <tgl@sss.pgh.pa.us>:
> "Jules Alberts" <jules.alberts@arbodienst-limburg.nl> writes:
> > Something like lastval() IMHO is way too risky.
>
> currval() is what you want, and it is *not* risky.  Read the sequence
> documentation.

I did that, and currval() _is_ the answer :-)

It operates on the current process only (out of curiosity I tested it),
so it's safe.

Thanks a lot!

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

Предыдущее
От: Shridhar Daithankar
Дата:
Сообщение: Re: PGconn thread safety
Следующее
От: will trillich
Дата:
Сообщение: Re: "Cannot insert a duplicate key..." -- SOLVED