Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D6B959FC445 for ; Thu, 18 Oct 2007 17:20:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 87788-05-2 for ; Thu, 18 Oct 2007 17:20:10 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from bay0-omc3-s29.bay0.hotmail.com (bay0-omc3-s29.bay0.hotmail.com [65.54.246.229]) by postgresql.org (Postfix) with ESMTP id 69C189FC450 for ; Thu, 18 Oct 2007 17:20:09 -0300 (ADT) Received: from BAYC1-PASMTP06 ([65.54.191.166]) by bay0-omc3-s29.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 18 Oct 2007 13:20:07 -0700 X-Originating-IP: [71.221.114.243] X-Originating-Email: [michaelmschmidt@msn.com] Message-ID: Received: from [127.0.0.1] ([71.221.114.243]) by BAYC1-PASMTP06.CEZ.ICE over TLS secured channel with Microsoft SMTPSVC(6.0.3790.2668); Thu, 18 Oct 2007 13:21:41 -0700 Date: Thu, 18 Oct 2007 14:20:06 -0600 From: Michael Schmidt Reply-To: MichaelMSchmidt@msn.com User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Kris Jurka CC: Mark Lewis , Andrei Ilitchev , pgsql-jdbc@postgresql.org, Marina Vatkina Subject: Re: Fw: postgresql experts please help References: <001101c81189$2f3f52d0$4c349c0a@ca.oracle.com> <1192728857.6447.82.camel@archimedes> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Oct 2007 20:21:41.0796 (UTC) FILETIME=[7EC1EE40:01C811C4] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.028 tagged_above=0 required=5 tests=AWL=-0.590, BAYES_40=-0.185, MSGID_FROM_MTA_HEADER=0.803 X-Spam-Level: X-Archive-Number: 200710/109 X-Sequence-Number: 17681 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