Skip site navigation (1) Skip section navigation (2)

Re: [SQL] Problems ensuring uniqueness?

From: Christopher Smith <x(at)xman(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [SQL] Problems ensuring uniqueness?
Date: 2001-06-18 21:57:45
Message-ID: 992901470.6585.2.camel@rivest.xdrive.com (view raw or flat)
Thread:
Lists: pgsql-jdbcpgsql-sql
On 18 Jun 2001 17:42:15 -0400, Tom Lane wrote:
> Christopher Smith <x(at)xman(dot)org> 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). The actual line in
question looks like this in Java:

boolean answer = resultSetCount.getInt(1) > 0;

I accidently transcribed the field offset instead of the comparison
constant.... probably should split that up into two lines of code to
avoid confusion like this...

--Chris


In response to

Responses

pgsql-sql by date

Next:From: Tom LaneDate: 2001-06-18 22:04:14
Subject: Re: [SQL] Problems ensuring uniqueness?
Previous:From: Tony ReinaDate: 2001-06-18 21:54:24
Subject: Are there array functions in Postgres?

pgsql-jdbc by date

Next:From: Tom LaneDate: 2001-06-18 22:04:14
Subject: Re: [SQL] Problems ensuring uniqueness?
Previous:From: Tom LaneDate: 2001-06-18 21:42:15
Subject: Re: [SQL] Problems ensuring uniqueness?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group