pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Doran <bobtfish@bobtfish.net>
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 10:51:01 -0400
Message-ID: <4557.1180018261@sss.pgh.pa.us> (raw)
In-Reply-To: <AFCB5437-EFE9-43A6-A455-A2B761E86581@bobtfish.net>
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>

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:
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



view thread (9+ messages)  latest in thread

Message-ID: <4557.1180018261@sss.pgh.pa.us>
Permalink:  ../4557.1180018261@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4557.1180018261@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, bobtfish@bobtfish.net, dev@archonet.com, mstepnicki@gmail.com
  Subject: Re: Potential bug in postgres 8.2.4
  In-Reply-To: <4557.1180018261@sss.pgh.pa.us>

* 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