Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 739B09FC2A2 for ; Thu, 18 Oct 2007 17:05:53 -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 83715-03 for ; Thu, 18 Oct 2007 17:05:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id CC6C59FC38D for ; Thu, 18 Oct 2007 17:05:44 -0300 (ADT) Received: (qmail 14414 invoked by uid 1112); 18 Oct 2007 20:05:42 -0000 Date: Thu, 18 Oct 2007 16:05:42 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Josh Berkus cc: pgsql-jdbc@postgresql.org, Andrei Ilitchev , Marina Vatkina Subject: Re: Fw: postgresql experts please help In-Reply-To: <200710181257.37449.josh@agliodbs.com> Message-ID: References: <001101c81189$2f3f52d0$4c349c0a@ca.oracle.com> <00d601c811b7$47c1a6e0$4c349c0a@ca.oracle.com> <200710181257.37449.josh@agliodbs.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/106 X-Sequence-Number: 17678 On Thu, 18 Oct 2007, Josh Berkus wrote: > I'm pretty sure there's a version of lastval() which takes the table > name as a parameter. That would be the safer one to use. > There is: SELECT currval(pg_get_serial_sequence('mytab','mycol')); Kris Jurka