Re: GetLastInsertID ? - Mailing list pgsql-general

From Mike Nolan
Subject Re: GetLastInsertID ?
Date
Msg-id 200401041847.i04IlLBd020297@gw.tssi.com
Whole thread Raw
In response to Re: GetLastInsertID ?  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: GetLastInsertID ?
List pgsql-general
> Where do you get that impression? currval() refers to the last ID for the
> session you are in. It's also FAQ question 4.15.3. Even better, if you
> havn't used nextval() in your current session, currval() returns an error,
> so you can't even get it wrong by accident.

I stand corrected.  I was doing some testing of a PHP module that is
called from a web form a while back and got inconsistent results with
currval, I probably had a script error of some kind.
--
Mike Nolan

pgsql-general by date:

Previous
From: Scott Ribe
Date:
Subject: Re: Scripting a new db server setup
Next
From: A E
Date:
Subject: Anything akin to an Evaluate Statement in Postgresql?