pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
finding current oid
2+ messages / 2 participants
[nested] [flat]

* finding current oid
@ 2001-07-06 13:46 postgresql <pgsql@symcom.com>
  2001-07-06 15:10 ` Re: finding current oid Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 2+ messages in thread

From: postgresql @ 2001-07-06 13:46 UTC (permalink / raw)
  To: pgsql-sql



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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: finding current oid
  2001-07-06 13:46 finding current oid postgresql <pgsql@symcom.com>
@ 2001-07-06 15:10 ` Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2001-07-06 15:10 UTC (permalink / raw)
  To: postgresql <pgsql@symcom.com>; +Cc: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-07-06 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-07-06 13:46 finding current oid postgresql <pgsql@symcom.com>
2001-07-06 15:10 ` Peter Eisentraut <peter_e@gmx.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox