From: Stephen van Egmond <svanegmond@bang.dhs.org>
To: GH <grasshacker@over-yonder.net>
Cc: svanegmond@home.com, "Julio Cuz, Jr." <jcuz@rccd.cc.ca.us>
Cc: pgsql-php@postgresql.org
Subject: Re: Automatic increment
Date: Thu, 11 Jan 2001 22:41:35 -0500
Message-ID: <20010111224135.A31773@bang.dhs.org> (raw)
In-Reply-To: <20010111212523.A76845@over-yonder.net>
References: <4.3.2.7.2.20010111190805.00b4b6a0@rccd.cc.ca.us>
<20010111222205.A31717@bang.dhs.org>
<20010111212523.A76845@over-yonder.net>
GH (grasshacker@over-yonder.net) wrote:
> I believe that it is commonly preferred to do:
> select nextval('sequence');
> insert into foo (foo_id,...) values (<nextval>, ...);
Many people do the first SELECT on a form, stuff the result in a hidden
variable, then do the INSERT in the form's handler. This prevents the
double- (or triple-) clicking of "submit" resulting in extra database
inserts.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: svanegmond@bang.dhs.org, grasshacker@over-yonder.net, jcuz@rccd.cc.ca.us, pgsql-php@postgresql.org
Subject: Re: Automatic increment
In-Reply-To: <20010111224135.A31773@bang.dhs.org>
References: <4.3.2.7.2.20010111190805.00b4b6a0@rccd.cc.ca.us> <20010111222205.A31717@bang.dhs.org> <20010111212523.A76845@over-yonder.net> <20010111224135.A31773@bang.dhs.org>
* 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