Thread: finding current oid

finding current oid

From
"postgresql"
Date:

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

From
Peter Eisentraut
Date:
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