Thread: OID again
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
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
Thank you for your help Peter ! Renaud THONNART Peter Eisentraut wrote: > 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