pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: GH <grasshacker@over-yonder.net>
To: svanegmond@home.com
Cc: Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>
Cc: pgsql-php@postgresql.org
Subject: Re: Automatic increment
Date: Thu, 11 Jan 2001 21:54:30 -0600
Message-ID: <20010111215430.A76932@over-yonder.net> (raw)
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>

On Thu, Jan 11, 2001 at 10:41:35PM -0500, some SMTP stream spewed forth: 
> 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.

My humble appreciation to you for bringing to my attention that which I 
(unbelievably - to me, anyway ;-) ) overlooked.

*bow out into the darkness of the wild Internet yonder*

gh




view thread (7+ messages)  latest in thread

Message-ID: <20010111215430.A76932@over-yonder.net>
Permalink:  ../20010111215430.A76932@over-yonder.net/
Also on:    postgresql.org/message-id/20010111215430.A76932@over-yonder.net

 · 

reply

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: grasshacker@over-yonder.net, svanegmond@home.com, jcuz@rccd.cc.ca.us, pgsql-php@postgresql.org
  Subject: Re: Automatic increment
  In-Reply-To: <20010111215430.A76932@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> <20010111224135.A31773@bang.dhs.org> <20010111215430.A76932@over-yonder.net>

* 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