On 24 May 2007, at 15:51, Tom Lane wrote:

Tomas Doran <[EMAIL PROTECTED]> 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


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to