Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D163F9FBA5D for ; Thu, 24 May 2007 08:51:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 12706-07 for ; Thu, 24 May 2007 08:51:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from gauss.credativ.com (ipx11302.ipxserver.de [212.112.227.254]) by postgresql.org (Postfix) with ESMTP id 41B359FBD72 for ; Thu, 24 May 2007 08:51:28 -0300 (ADT) Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id A9D9DD7665; Thu, 24 May 2007 13:51:23 +0200 (CEST) Received: from kodaira.local (unknown [24.114.252.226]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gauss.credativ.com (Postfix) with ESMTP id ED13FD7651; Thu, 24 May 2007 13:51:22 +0200 (CEST) From: Peter Eisentraut To: pgsql-sql@postgresql.org Subject: Re: Potential bug in postgres 8.2.4 Date: Thu, 24 May 2007 13:51:15 +0200 User-Agent: KMail/1.9.5 Cc: Tomas Doran , tdoran@venda.com References: <3D2864D1-BF64-4609-B307-1C70A4FE503F@bobtfish.net> In-Reply-To: <3D2864D1-BF64-4609-B307-1C70A4FE503F@bobtfish.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200705241351.15767.peter_e@gmx.net> X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/166 X-Sequence-Number: 28446 Am Donnerstag, 24. Mai 2007 13:20 schrieb Tomas Doran: > CREATE TABLE testtable ( >      col1   char(1), >     data   text > ); > 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); All of this is strictly speaking incorrect anyway. And the queries that do work will most likely start not working in a future version. All of this is a gradual effort to reduce excessive automatic type casting. I suggest you fix your application. -- Peter Eisentraut http://developer.postgresql.org/~petere/