OID again

Started by Renaud Tthonnartalmost 25 years ago3 messagesgeneral
Jump to latest
#1Renaud Tthonnart
thonnart@amwdb.u-strasbg.fr

Hi!

I would like to know if it was possible to get the OID of a tuple when
we insert it, but not by making a "SELECT oid ... "
Perhaps does a function of libpq++ exist?
Something like :

data.Exec("INSERT INTO table VALUES (10,20, 'aaa')");
int oid = data.GetOid();

Thank you.

Sincerely,
Renaud THONNART

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Renaud Tthonnart (#1)
Re: OID again

Renaud Thonnart writes:

I would like to know if it was possible to get the OID of a tuple when
we insert it, but not by making a "SELECT oid ... "
Perhaps does a function of libpq++ exist?
Something like :

data.Exec("INSERT INTO table VALUES (10,20, 'aaa')");
int oid = data.GetOid();

There's a function called PQoidValue() in libpq. Not sure if it's
available through libpq++, though.

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

#3Renaud Tthonnart
thonnart@amwdb.u-strasbg.fr
In reply to: Peter Eisentraut (#2)
Re: OID again

Thank you for your help Peter !

Renaud THONNART

Peter Eisentraut wrote:

Show quoted text

Renaud Thonnart writes:

I would like to know if it was possible to get the OID of a tuple when
we insert it, but not by making a "SELECT oid ... "
Perhaps does a function of libpq++ exist?
Something like :

data.Exec("INSERT INTO table VALUES (10,20, 'aaa')");
int oid = data.GetOid();

There's a function called PQoidValue() in libpq. Not sure if it's
available through libpq++, though.

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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html