Re: Exploring sequences (sequence context within a tran saction)

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Sykora, Dale" <Dale(dot)Sykora(at)COMPAQ(dot)com>
Cc: "'NetBeans'" <erik(at)cariboulake(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Exploring sequences (sequence context within a tran saction)
Date: 2001-06-13 13:21:15
Message-ID: 20010613082115.B20924@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 12, 2001 at 02:08:13PM -0500,
"Sykora, Dale" <Dale(dot)Sykora(at)COMPAQ(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2001-06-13 13:25:35 Re: Re: very big problem with NULL
Previous Message Bruno Wolff III 2001-06-13 13:16:56 Re: [SQL] ORDER BY what?