X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D8AE0563D6 for ; Mon, 21 Mar 2005 12:52:48 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75389-09 for ; Mon, 21 Mar 2005 12:52:48 +0000 (GMT) Received: from mnc.ch (unknown [212.23.250.43]) by svr1.postgresql.org (Postfix) with ESMTP id 9104B563D4 for ; Mon, 21 Mar 2005 12:52:46 +0000 (GMT) Received: (qmail 11844 invoked from network); 21 Mar 2005 13:52:50 +0100 Received: from 62-2-77-204.business.cablecom.ch (HELO meuh.mnc.ch) (62.2.77.204) by www.mnc.ch.com with SMTP; 21 Mar 2005 13:52:50 +0100 Received: by meuh.mnc.ch (Postfix, from userid 1000) id B1C3A23F50C; Mon, 21 Mar 2005 13:52:46 +0100 (CET) To: pg@fastcrypt.com Cc: Nico , pgsql-jdbc@postgresql.org Subject: Re: getting a sequence value References: <423EBDFA.9040507@fastcrypt.com> <87acoxuqcn.fsf@meuh.mnc.ch> <423EC1CE.6050701@fastcrypt.com> From: Guillaume Cottenceau Date: 21 Mar 2005 13:52:46 +0100 In-Reply-To: <423EC1CE.6050701@fastcrypt.com> Message-ID: <87y8chtb35.fsf@meuh.mnc.ch> Lines: 21 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.052 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/174 X-Sequence-Number: 12566 Dave Cramer 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