From: Tomas Doran <bobtfish@bobtfish.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Richard Huxton <dev@archonet.com>
Cc: Marcin Stępnicki <mstepnicki@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Potential bug in postgres 8.2.4
Date: Thu, 24 May 2007 16:19:50 +0100
Message-ID: <80B9155B-668A-4295-8AF4-707AD01409EA@bobtfish.net> (raw)
In-Reply-To: <4557.1180018261@sss.pgh.pa.us>
References: <3D2864D1-BF64-4609-B307-1C70A4FE503F@bobtfish.net>
<pan.2007.05.24.11.34.03.780983@gmail.com>
<72573535-0946-45DE-B5E4-E57236965B0E@bobtfish.net>
<465582E1.3030409@archonet.com>
<AFCB5437-EFE9-43A6-A455-A2B761E86581@bobtfish.net>
<4557.1180018261@sss.pgh.pa.us>
On 24 May 2007, at 15:51, Tom Lane wrote:
> Tomas Doran <bobtfish@bobtfish.net> writes:
>> The tightening in general is biting me, but if the answer was 'it was
>> deliberate tightening', and the behavior was consistent, then we'd
>> have just dealt with it - it's the in-consistent behavior that makes
>> me think this is a bug (or at least a gotcha, as it's not what you
>> expect)...
>
> The direction of the future is that *all* those queries are going to
> fail, because they're relying on an implicit integer-to-text
> conversion,
> and its days are numbered. That might happen as soon as 8.3:
<snip>
That's no bad thing.
> I think the reason this particular behavior changed in 8.2 is the
> re-implementation of multi-element IN tests as ScalarArrayOps;
> but it's part of an intentional long-term tightening of SQL semantics,
> and you're not going to get far with a proposal to revert it.
I wasn't suggesting reverting it - just that lists of one element
being treated differently to lists of >1 element is not what I
expected :)
> Fix your code.
Easier said than done, but thankfully also not strictly my problem.
We have found that a newer database driver version does 'the right
thing' for us by quoting the values in the IN () list.
Our reason for not upgrading is that this driver connects using the
v8 protocol, and ergo logs an error when connecting to our legacy
postgres 7.2 databases (the error is logged in the DB backend as it
doesn't understand the v8 protocol). Yes, we are a million years
behind in upgrading - it's underway currently...
The number of machines using the db / making connections causes the
volumes of errors seen in the server logs to go totally mental, so we
can't use the new driver with the legacy DBs
The current plan is to rebuild our 7.2 server to just remove this
error message, and upgrade the database driver - as that wins us a
lot of other things too.
Thanks for the swift and comprehensive response guys!
Cheers
Tom
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bobtfish@bobtfish.net, tgl@sss.pgh.pa.us, dev@archonet.com, mstepnicki@gmail.com
Subject: Re: Potential bug in postgres 8.2.4
In-Reply-To: <80B9155B-668A-4295-8AF4-707AD01409EA@bobtfish.net>
* 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