From: John C Cusick <jcc2@juno.com>
To: pgsql-sql@postgresql.org
Subject: Getting last used oid
Date: Tue, 7 Dec 1999 11:31:16 -0500
Message-ID: <19991207.113118.-748361.0.jcc2@juno.com> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: jcc2@juno.com
Subject: Re: Getting last used oid
In-Reply-To: <19991207.113118.-748361.0.jcc2@juno.com>
References: <19991207.113118.-748361.0.jcc2@juno.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox