Re: Potential bug in postgres 8.2.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tomas Doran <bobtfish(at)bobtfish(dot)net>
Cc: Richard Huxton <dev(at)archonet(dot)com>, Marcin Stępnicki <mstepnicki(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Potential bug in postgres 8.2.4
Date: 2007-05-24 14:51:01
Message-ID: 4557.1180018261@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tomas Doran <bobtfish(at)bobtfish(dot)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:
http://archives.postgresql.org/pgsql-hackers/2007-04/msg00017.php
but it's been on the radar screen for a very long time, eg
http://archives.postgresql.org/pgsql-bugs/2001-10/msg00108.php
http://archives.postgresql.org/pgsql-hackers/2002-04/msg00450.php
http://archives.postgresql.org/pgsql-sql/2004-01/msg00064.php
http://archives.postgresql.org/pgsql-hackers/2005-11/msg00510.php

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.
Fix your code.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tomas Doran 2007-05-24 15:19:50 Re: Potential bug in postgres 8.2.4
Previous Message Tomas Doran 2007-05-24 12:34:10 Re: Potential bug in postgres 8.2.4