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 70F0C56400 for ; Mon, 21 Mar 2005 12:55:26 +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 78379-01 for ; Mon, 21 Mar 2005 12:55:24 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id D70CB563F9 for ; Mon, 21 Mar 2005 12:55:23 +0000 (GMT) Received: (qmail 24311 invoked from network); 21 Mar 2005 12:54:21 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 21 Mar 2005 12:54:21 -0000 Message-ID: <423EC43A.9060405@fastcrypt.com> Date: Mon, 21 Mar 2005 07:55:22 -0500 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Guillaume Cottenceau 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> <87y8chtb35.fsf@meuh.mnc.ch> In-Reply-To: <87y8chtb35.fsf@meuh.mnc.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.035 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/176 X-Sequence-Number: 12568 Sorry, misunderstood you. Dave Guillaume Cottenceau wrote: >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. > > > -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561