From: | Matt McClure <matthew(dot)mcclure(at)yale(dot)edu> |
---|---|
To: | Peter T Mount <peter(at)retep(dot)org(dot)uk> |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] returning oid of last insert? |
Date: | 1998-07-21 16:27:56 |
Message-ID: | Pine.GSO.3.94.980721122541.10191F-100000@mercury.cis.yale.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks for the help. I checked libpq, and just to follow up, it is quite
easy to get the oid of the last insert using the routine oidStatus.
On Sun, 19 Jul 1998, Peter T Mount wrote:
> 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(at)retep(dot)org(dot)uk or petermount(at)earthling(dot)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(at)maidstone(dot)gov(dot)uk
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ken McGlothlen | 1998-07-21 17:32:47 | Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux] |
Previous Message | Bruce Tong | 1998-07-21 15:51:23 | Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux] |