Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id D9044475DE1 for ; Mon, 6 May 2002 15:49:29 -0400 (EDT) Received: from mail.bearriver.com (unknown [63.143.82.3]) by postgresql.org (Postfix) with ESMTP id 28055475C4C for ; Mon, 6 May 2002 15:29:28 -0400 (EDT) Received: from [192.168.1.100] (bdsl.66.13.212.178.gte.net [66.13.212.178]) by mail.bearriver.com (8.11.6/8.11.6) with ESMTP id g46JTK017202 for ; Mon, 6 May 2002 12:29:20 -0700 Mime-Version: 1.0 X-Sender: joels@mail.bearriver.com Message-Id: In-Reply-To: <20010507142738.DE7B63F43@bast.unixathome.org> References: <20010507124341.00EE03F43@bast.unixathome.org> <20010507142738.DE7B63F43@bast.unixathome.org> Date: Mon, 6 May 2002 12:29:17 -0700 To: pgsql-admin@postgresql.org From: Joel Stevenson Subject: Re: SERIAL Field Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Archive-Number: 200205/38 X-Sequence-Number: 4213 > > "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.