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/