pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Cottenceau <gc@mnc.ch>
To: pg@fastcrypt.com
Cc: Nico <nicohmail-postgresql@yahoo.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: getting a sequence value
Date: 21 Mar 2005 13:52:46 +0100
Message-ID: <87y8chtb35.fsf@meuh.mnc.ch> (raw)
In-Reply-To: <423EC1CE.6050701@fastcrypt.com>
References: <d1mb4u$1j89$1@news.hub.org>
	<423EBDFA.9040507@fastcrypt.com>
	<87acoxuqcn.fsf@meuh.mnc.ch>
	<423EC1CE.6050701@fastcrypt.com>

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



view thread (9+ messages)  latest in thread

Message-ID: <87y8chtb35.fsf@meuh.mnc.ch>
Permalink:  ../87y8chtb35.fsf@meuh.mnc.ch/
Also on:    postgresql.org/message-id/87y8chtb35.fsf@meuh.mnc.ch

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: gc@mnc.ch, pg@fastcrypt.com, nicohmail-postgresql@yahoo.com
  Subject: Re: getting a sequence value
  In-Reply-To: <87y8chtb35.fsf@meuh.mnc.ch>
  References: <d1mb4u$1j89$1@news.hub.org> <423EBDFA.9040507@fastcrypt.com> <87acoxuqcn.fsf@meuh.mnc.ch> <423EC1CE.6050701@fastcrypt.com> <87y8chtb35.fsf@meuh.mnc.ch>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox