Re: SERIAL Field

From: Joel Stevenson <jstevenson(at)bearriver(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: SERIAL Field
Date: 2002-05-06 19:29:17
Message-ID: a05111709b8fc88c96775@[192.168.1.100]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> > "You say nextval() + write, I say write + currval()..."
>
>So long as a given application does not mix the two approaches, everything
>should be fine.

Though, if you have multiple clients inserting into the table, there
is a chance that between client A inserting the record and then
calling currval(), client B could have performed an insert, in which
case client A gets the value of client B's record. 'nextval() +
write' avoids this possible overlap.
--
Joel Stevenson
Bear River Associates, Inc.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2002-05-06 20:16:31 Re: SERIAL Field
Previous Message Brian McCane 2002-05-06 18:49:07 Re: SERIAL Field