Received: from draco.over-yonder.net ([63.147.13.14]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0C3sYp79704 for ; Thu, 11 Jan 2001 22:54:34 -0500 (EST) (envelope-from gh@over-yonder.net) Received: by draco.over-yonder.net (Postfix, from userid 1012) id CE8E262D07; Thu, 11 Jan 2001 21:54:30 -0600 (CST) Date: Thu, 11 Jan 2001 21:54:30 -0600 From: GH To: svanegmond@home.com Cc: "Julio Cuz, Jr." , pgsql-php@postgresql.org Subject: Re: Automatic increment Message-ID: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010111224135.A31773@bang.dhs.org>; from svanegmond@bang.dhs.org on Thu, Jan 11, 2001 at 10:41:35PM -0500 X-OS: FreeBSD X-Archive-Number: 200101/47 X-Sequence-Number: 112 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 (, ...); > > > 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