Re: Automatic increment

From: GH <grasshacker(at)over-yonder(dot)net>
To: svanegmond(at)home(dot)com
Cc: "Julio Cuz, Jr(dot)" <jcuz(at)rccd(dot)cc(dot)ca(dot)us>, pgsql-php(at)postgresql(dot)org
Subject: Re: Automatic increment
Date: 2001-01-12 03:54:30
Message-ID: 20010111215430.A76932@over-yonder.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php pgsql-sql

On Thu, Jan 11, 2001 at 10:41:35PM -0500, some SMTP stream spewed forth:
> GH (grasshacker(at)over-yonder(dot)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

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Stephen van Egmond 2001-01-12 04:10:08 Re: pg_loopen() error
Previous Message Stephen van Egmond 2001-01-12 03:41:35 Re: Automatic increment

Browse pgsql-sql by date

  From Date Subject
Next Message Justin Clift 2001-01-12 03:57:56 Re: Possible bug? WAS :Bad (null) varchar() external representation.
Previous Message Stephen van Egmond 2001-01-12 03:41:35 Re: Automatic increment