Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D56129FB99D for ; Thu, 24 May 2007 08:21:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 28830-09 for ; Thu, 24 May 2007 08:20:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id D16879FB7A9 for ; Thu, 24 May 2007 08:21:02 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.venda.com (mail.venda.com [195.99.220.5]) by svr4.postgresql.org (Postfix) with SMTP id D8DC45AF074 for ; Thu, 24 May 2007 11:21:01 +0000 (GMT) Received: from [10.101.2.205] ([10.101.2.205]) by mail.venda.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 24 May 2007 12:23:21 +0100 Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3D2864D1-BF64-4609-B307-1C70A4FE503F@bobtfish.net> Cc: tdoran@venda.com Content-Transfer-Encoding: 7bit From: Tomas Doran Subject: Potential bug in postgres 8.2.4 Date: Thu, 24 May 2007 12:20:54 +0100 To: pgsql-sql@postgresql.org X-Mailer: Apple Mail (2.752.2) X-OriginalArrivalTime: 24 May 2007 11:23:21.0343 (UTC) FILETIME=[EF76B0F0:01C79DF5] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/164 X-Sequence-Number: 28444 I'm not sure if this is a bug, or not - but it looks like one to me. if you say: CREATE TABLE testtable ( col1 char(1), data text ); INSERT INTO testtable (col1, data) VALUES ('1', 'foobar'); INSERT INTO testtable (col1, data) VALUES ('2', 'foobarbaz'); The following queries all work: INSERT INTO testtable (col1, data) VALUES (3::int, 'foobarbazquux'); SELECT * FROM testtable WHERE col1 = 3::int; SELECT * FROM testtable WHERE col1 IN (1); SELECT * FROM testtable WHERE col1 IN (1::int); However these querys fail on 8.2.4, but work correctly on 8.1: SELECT * FROM testtable WHERE col1 IN (1::int, 2::int); SELECT * FROM testtable WHERE col1 IN (1, 2); I could understand if the behavior was the same for single element IN clauses, and multiple element IN clauses - however as their behavior is different, and it used to work in 8.1.... Cheers Tom