Re: Exploring sequences (sequence context within a tran saction) - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Exploring sequences (sequence context within a tran saction)
Date
Msg-id 20010613082115.B20924@wolff.to
Whole thread Raw
In response to RE: Exploring sequences (sequence context within a tran saction)  ("Sykora, Dale" <Dale.Sykora@COMPAQ.com>)
List pgsql-general
On Tue, Jun 12, 2001 at 02:08:13PM -0500,
  "Sykora, Dale" <Dale.Sykora@COMPAQ.com> wrote:
> Erik,
>     If your bar column has unique values, perhaps you could SELECT foo
> FROM foobar where bar='whatever'; after your insert. Or perhaps write a
> procedure that stores the currval into a variable named by user/session/etc
> if this is possible.

currval is already tied to the current session. You can use it to refer
to the last serial value used in the current session.

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: [SQL] ORDER BY what?
Next
From: Bruno Wolff III
Date:
Subject: Re: Re: very big problem with NULL