Re: Sequences - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: Sequences
Date
Msg-id 20020211155137.GA4605@wolff.to
Whole thread Raw
In response to Re: Sequences  ("Hunter, Ray" <rhunter@enterasys.com>)
List pgsql-sql
On Mon, Feb 11, 2002 at 10:12:33AM -0500, "Hunter, Ray" <rhunter@enterasys.com> wrote:
> The only problem with this solution is that I have already incremented the
> sequence and need to use the current value?  Is there a way to assign the
> value to a variable and then use it in an insert statement?

You should be doing this in one transaction in which case currval should
work. If you aren't doing it in one transaction, then your application
will need to remember the current value.


pgsql-sql by date:

Previous
From: mallah@trade-india.com
Date:
Subject: Re: Sequences
Next
From: Markus Bertheau
Date:
Subject: Re: Sequences