Potential bug in postgres 8.2.4
От | Tomas Doran |
---|---|
Тема | Potential bug in postgres 8.2.4 |
Дата | |
Msg-id | 3D2864D1-BF64-4609-B307-1C70A4FE503F@bobtfish.net обсуждение исходный текст |
Ответы |
Re: Potential bug in postgres 8.2.4
|
Список | pgsql-sql |
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
В списке pgsql-sql по дате отправления: