On Tue, Oct 23, 2001 at 02:38:04PM -0400, Kevin HaleBoyes wrote:
> Is this actually guaranteed to work?
> What happens if another call to append_test() is made such that
> the insert takes place in the first call, then the insert takes place
> in the second call before the select currval().
Yes,
Bruce Cota <[EMAIL PROTECTED]> writes:
> Is there a way, in SQL, to access the oid of the row created
> by an immediately preceding insert statement?
If you are writing a psql script, recent psql versions maintain
a LASTOID variable:
regression=# insert into int4_tbl default values;
INSERT 33574
On Thu, Oct 18, 2001 at 10:29:09AM -0400, Bruce Cota wrote:
> Thank you!
>
> Hopefully that getlastoid refers to the last oid
> created in this session or transaction? I can't find it
> mentioned in the docs anywhwere.
last insert, iirc.
> Nextval and curval aren't specific to the transaction