pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-sql@postgresql.org
Subject: Re: [PHP] Automatic increment
Date: Fri, 12 Jan 2001 08:43:17 -0800
Message-ID: <web-1176343@davinci.ethosmedia.com> (raw)
In-Reply-To: <20010111215430.A76932@over-yonder.net>

GH, svangemond,

> > 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.

Actually, that raises a very good question:

If I have a defined sequence 'universal_sq', and I want to
insert rows into a table using 'universal_sq', is there any
reason *not* to use the DEFAULT NEXTVAL('universal_sq')
declaration in the table definition?

For example, if I want to locate the NEXTVAL. do a bunch of
stuff, and then insert the record, does this obligate me to
take the DEFAULT NEXTVAL out of the table and do it the
NEXTVAL insertion in my functions, or is it irrelevant?

-Josh Berkus



view thread (7+ messages)

Message-ID: <web-1176343@davinci.ethosmedia.com>
Permalink:  ../web-1176343@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-1176343@davinci.ethosmedia.com

 · 

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: josh@agliodbs.com
  Subject: Re: [PHP] Automatic increment
  In-Reply-To: <web-1176343@davinci.ethosmedia.com>
  References: <20010111215430.A76932@over-yonder.net> <web-1176343@davinci.ethosmedia.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