Re: Serial key

From: Kris Jurka <books(at)ejurka(dot)com>
To: John Sidney-Woollett <johnsw(at)wardbrook(dot)com>
Cc: Chris Smith <cdsmith(at)twu(dot)net>, Bhushan Bhangale <bbhangale(at)lastminute(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Serial key
Date: 2004-02-13 18:39:44
Message-ID: Pine.LNX.4.33.0402131333390.23705-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2004-02-13 18:53:14 Re: Serial key
Previous Message Kris Jurka 2004-02-13 18:33:24 Re: Startup message issues