Re: getting a sequence value

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: pg(at)fastcrypt(dot)com
Cc: Nico <nicohmail-postgresql(at)yahoo(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: getting a sequence value
Date: 2005-03-21 12:52:46
Message-ID: 87y8chtb35.fsf@meuh.mnc.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dave Cramer <pg 'at' fastcrypt.com> writes:

> Guillaume,
>
> No it can't be wrong from the database's point of view, now what
> happens in java is another problem

Yes, of course :)

> Here's how it works, in principle anyway.
>
> The last value of each sequence which has been generated using nextval
> is stored in the connections session memory.
> so when you use the SAME connection to retrieve currval it will
> retrieve that value.

We agree. And what the original poster wanted to do with his data
will be incorrect.

--
Guillaume Cottenceau

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2005-03-21 12:53:47 Re: getting a sequence value
Previous Message Dave Cramer 2005-03-21 12:45:02 Re: getting a sequence value