Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5IM4Ka10296; Mon, 18 Jun 2001 18:04:20 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f5IM4E308978; Mon, 18 Jun 2001 18:04:14 -0400 (EDT) To: Christopher Smith cc: pgsql-sql@postgresql.org, pgsql-jdbc@postgresql.org Subject: Re: [SQL] Problems ensuring uniqueness? In-reply-to: <992901470.6585.2.camel@rivest.xdrive.com> References: <992898628.6594.1.camel@rivest.xdrive.com> <8896.992900535@sss.pgh.pa.us> <992901470.6585.2.camel@rivest.xdrive.com> Comments: In-reply-to Christopher Smith message dated "18 Jun 2001 14:57:45 -0700" Date: Mon, 18 Jun 2001 18:04:14 -0400 Message-ID: <8975.992901854@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200106/52 X-Sequence-Number: 793 Christopher Smith writes: >> Um ... surely that should be "if count > 0" ? Or was that just a >> transcription error? >> >> This approach certainly ought to work as desired given the exclusive >> lock, so a silly typo seems like a plausible explanation... > Sorry, it is indeed a transcription error (sadly). Oh well. The next thought, given that you mention threads, is that you've got multiple threads issuing commands to the same backend connection; in which case the interlocking you think you have doesn't exist at all... regards, tom lane