Re: Potential bug in postgres 8.2.4

Поиск
Список
Период
Сортировка
От Tomas Doran
Тема Re: Potential bug in postgres 8.2.4
Дата
Msg-id 80B9155B-668A-4295-8AF4-707AD01409EA@bobtfish.net
обсуждение исходный текст
Ответ на Re: Potential bug in postgres 8.2.4  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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



В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Potential bug in postgres 8.2.4
Следующее
От: chester c young
Дата:
Сообщение: off topic