Re: Fw: postgresql experts please help

From: Michael Schmidt <MichaelMSchmidt(at)msn(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Mark Lewis <mark(dot)lewis(at)mir3(dot)com>, Andrei Ilitchev <andrei(dot)ilitchev(at)oracle(dot)com>, pgsql-jdbc(at)postgresql(dot)org, Marina Vatkina <Marina(dot)Vatkina(at)Sun(dot)COM>
Subject: Re: Fw: postgresql experts please help
Date: 2007-10-18 20:20:06
Message-ID: BAYC1-PASMTP06B82BA1B0737436579E17A39E0@CEZ.ICE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kris Jurka wrote:
>
>
> On Thu, 18 Oct 2007, Michael Schmidt wrote:
>
>> Also, from my read of the documentation and experience, you have to
>> call nextval before you can call currval in the transaction.
>>
>
> Right, but the insert should trigger the default on the serial column to
> call nextval behind the scenes.
>
> Kris Jurka
>
Exactly, because nextval is the default for the sequence. However, if
you do a transaction in which you don't do an insert, then currval won't
be available.

Michael Schmidt

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2007-10-18 20:59:57 Re: [JDBC] Re: 'on insert do instead' rule with a where clause responds 'INSERT 0 0'
Previous Message Kris Jurka 2007-10-18 20:18:42 Re: Fw: postgresql experts please help