Обсуждение: finding current oid

Поиск
Список
Период
Сортировка

finding current oid

От
"postgresql"
Дата:

Is there a way to return the current oid of a transaction?

I am trying to:

begin;
insert into db something;
select current session oid
commit;

I will only ever be inserting one row during the transaction.

Is this doable?

Thanks for your time.

Ted




Re: finding current oid

От
Peter Eisentraut
Дата:
postgresql writes:

> Is there a way to return the current oid of a transaction?

Transactions don't have oids, only table rows do.  The libpq function
PQoidValue() will possibly give you the last affected oid.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter