From: Josh Berkus <josh@agliodbs.com>
To: Charles Hauser <chauser@duke.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: problem fetching currval of sequence
Date: Tue, 6 Aug 2002 14:26:58 -0700
Message-ID: <200208061426.58011.josh@agliodbs.com> (raw)
In-Reply-To: <a05111b03b975e0252d02@[152.3.11.193]>
References: <web-1602018@davinci.ethosmedia.com>
<200208061135.20799.josh@agliodbs.com>
<a05111b03b975e0252d02@[152.3.11.193]>
Charles,
> I know this script worked in the past, but I have not used it
> recently. We are running PostgreSQL 7.1.3. It would be great if
> this would work as I have several scripts which operate in a similar
> manner for different TABLES, but if it won't work I'll work around it.
>
> Suggestions for the best way to get the value for the gb_id after an INSERT?
I usually SELECT NEXTVAL(), and then pass that ID number to the INSERT
statement. It's very reliable.
--
-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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, chauser@duke.edu
Subject: Re: problem fetching currval of sequence
In-Reply-To: <200208061426.58011.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox