Re: Potential bug in postgres 8.2.4 - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: Potential bug in postgres 8.2.4
Date
Msg-id 200705241351.15767.peter_e@gmx.net
Whole thread Raw
In response to Potential bug in postgres 8.2.4  (Tomas Doran <bobtfish@bobtfish.net>)
List pgsql-sql
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/


pgsql-sql by date:

Previous
From: Marcin Stępnicki
Date:
Subject: Re: Potential bug in postgres 8.2.4
Next
From: Tomas Doran
Date:
Subject: Re: Potential bug in postgres 8.2.4