Received: from danbo.digsys.bg (root@danbo.digsys.bg [192.92.129.10]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA29667 for ; Wed, 8 Dec 1999 03:36:59 -0500 (EST) (envelope-from vlady@school.digsys.bg) Received: from school.digsys.bg (vlady@school.digsys.bg [193.68.6.1]) by danbo.digsys.bg (8.9.0/8.9.0) with ESMTP id KAA21411; Wed, 8 Dec 1999 10:36:53 +0200 (EET) Received: from localhost (vlady@localhost) by school.digsys.bg (8.8.5/8.8.5) with ESMTP id KAA20318; Wed, 8 Dec 1999 10:36:52 +0200 (EET) Date: Wed, 8 Dec 1999 10:36:51 +0200 (EET) From: Vladimir Terziev To: John C Cusick cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Getting last used oid In-Reply-To: <19991207.113118.-748361.0.jcc2@juno.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi John, There is diffrent ways to get last used oid. Perl DBD::Pg has $oid = $stmt->{pg_oid_status}, where $stmt is a last statement related with a insert command. Vladimir On Tue, 7 Dec 1999, John C Cusick wrote: > To All, > > How can I call up the last oid used in an insert statement? I've checked > the docs (but not the source - getting a little big :-) by way of the > TOC's and didn't see it. I'm assuming/hoping there is a function > similar to lastval, curval, nextval for sequences available to > do this that I would like to use in a trigger to populate another table. > > I also did a perusal of the new book, which looks *_really_* good so far, > but it didn't have what I was hoping to find. > > I can do it normally of course (select oid, 'last_inserted_unique_field') > from table;) but > i would like a more behind the scenes way. > > Thank you all, > > John C. > > ___________________________________________________________________ > Why pay more to get Web access? > Try Juno for FREE -- then it's just $9.95/month if you act NOW! > Get your free software today: http://dl.www.juno.com/dynoget/tagj. > > ************ > >