Re: Serial key - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Serial key
Date
Msg-id Pine.LNX.4.33.0402131333390.23705-100000@leary.csoft.net
Whole thread Raw
In response to Re: Serial key  ("John Sidney-Woollett" <johnsw@wardbrook.com>)
Responses Re: Serial key
List pgsql-jdbc

On Fri, 13 Feb 2004, John Sidney-Woollett wrote:

> Alternatively, if you could use a sequence object for the primary key
> value (instead of a serial column), and you switched autocommit off, you
> should be able to determine the last allocated PK id AFTER creating the
> record by querying the currval on the sequence.
>

autocommit has nothing to do with this, sequence state via currval is
session specific, not transaction specific.

Kris Jurka


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Startup message issues
Next
From: Dave Cramer
Date:
Subject: Re: Serial key