Re: [GENERAL] returning oid of last insert? - Mailing list pgsql-general

From Peter T Mount
Subject Re: [GENERAL] returning oid of last insert?
Date
Msg-id Pine.LNX.3.96.980719101356.3339F-100000@maidast.retep.org.uk
Whole thread Raw
In response to returning oid of last insert?  (Matt McClure <matthew.mcclure@yale.edu>)
Responses Re: [GENERAL] returning oid of last insert?  (Matt McClure <matthew.mcclure@yale.edu>)
List pgsql-general
On Sat, 18 Jul 1998, Matt McClure wrote:

> Is there a way to return the oid of the last insert command?

The protocol does return the oid, as a string. You can see this when using
psql. I'm not sure what libpq function returns this value though.

In JDBC, there isn't an official way, but the 6.4 driver does have a
method to retrieve the oid (It's used internally with the new object
serialization code). Earler versions store the string, but don't use it,
and have no method to retrieve it.


--
Peter T Mount peter@retep.org.uk or petermount@earthling.net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


pgsql-general by date:

Previous
From: Matt McClure
Date:
Subject: returning oid of last insert?
Next
From: Konstantinos Vassiliadis
Date:
Subject: Replaced Makefile in source directory (fwd)