Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 1DD2747665E; Fri, 7 Jun 2002 23:37:27 -0400 (EDT) Received: from svana.org (svana.org [210.9.66.30]) by postgresql.org (Postfix) with ESMTP id 267984764FC; Fri, 7 Jun 2002 23:37:25 -0400 (EDT) Received: from kleptog by svana.org with local (Exim 3.12 #1 (Debian)) id 17GX2R-0005jW-00; Sat, 08 Jun 2002 13:37:15 +1000 Date: Sat, 8 Jun 2002 13:37:15 +1000 From: Martijn van Oosterhout To: Lee Green Cc: Nicolas Nolst , pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: [GENERAL] performance issue using DBI Message-ID: <20020608133715.B21981@svana.org> Reply-To: Martijn van Oosterhout Mail-Followup-To: Lee Green , Nicolas Nolst , pgsql-admin@postgresql.org, pgsql-general@postgresql.org References: <3430B9A60E93564FAB3B5861335CBDCF183032@germanium.numethods.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3430B9A60E93564FAB3B5861335CBDCF183032@germanium.numethods.com>; from lgreen@nubridges.com on Thu, Jun 06, 2002 at 12:45:09PM -0400 X-Archive-Number: 200206/59 X-Sequence-Number: 4494 On Thu, Jun 06, 2002 at 12:45:09PM -0400, Lee Green wrote: > If you need to get the actual "current value" without incrementing, try: > > SELECT last_value FROM ; > > This will return the last value returned from a nextval command directly > > from the sequence properties in the system tables. Except that if you do it this way, you *will* be affected by setvals done by other users. Use currval(), that's what it's there for. -- Martijn van Oosterhout http://svana.org/kleptog/ > There are 10 kinds of people in the world, those that can do binary > arithmetic and those that can't.