Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8366C474E49 for ; Tue, 6 Aug 2002 17:25:51 -0400 (EDT) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id E2897474E44 for ; Tue, 6 Aug 2002 17:25:50 -0400 (EDT) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1602661; Tue, 06 Aug 2002 14:25:50 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Charles Hauser Subject: Re: problem fetching currval of sequence Date: Tue, 6 Aug 2002 14:26:58 -0700 X-Mailer: KMail [version 1.4] References: <200208061135.20799.josh@agliodbs.com> In-Reply-To: Cc: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200208061426.58011.josh@agliodbs.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/118 X-Sequence-Number: 8964 Charles, > I know this script worked in the past, but I have not used it=20 > recently. We are running PostgreSQL 7.1.3. It would be great if=20 > this would work as I have several scripts which operate in a similar=20 > manner for different TABLES, but if it won't work I'll work around it. >=20 > Suggestions for the best way to get the value for the gb_id after an INSE= RT? I usually SELECT NEXTVAL(), and then pass that ID number to the INSERT=20 statement. It's very reliable. --=20 -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco