Re: shorter way to get new value of serial? - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: shorter way to get new value of serial?
Date
Msg-id 20051118180515.GB29354@phlogiston.dyndns.org
Whole thread Raw
In response to shorter way to get new value of serial?  (Harald Armin Massa <haraldarminmassa@gmail.com>)
List pgsql-general
On Fri, Nov 18, 2005 at 02:26:26PM +0100, Harald Armin Massa wrote:
> everything is fine. BUT: I feel that this a SO USUAL request (please, give
> me the new primary key of that just inserted beast), that there may be a
> simpler way, and I am just to blind to see.

See the currval() documents:

http://www.postgresql.org/docs/8.1/interactive/functions-sequence.html

A
--
Andrew Sullivan  | ajs@crankycanuck.ca
This work was visionary and imaginative, and goes to show that visionary
and imaginative work need not end up well.
        --Dennis Ritchie

pgsql-general by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: How to debug a locked backend ?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: How to debug a locked backend ?