From: | Tomas Doran <bobtfish(at)bobtfish(dot)net> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Cc: | tdoran(at)venda(dot)com |
Subject: | Potential bug in postgres 8.2.4 |
Date: | 2007-05-24 11:20:54 |
Message-ID: | 3D2864D1-BF64-4609-B307-1C70A4FE503F@bobtfish.net |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Marcin Stępnicki | 2007-05-24 11:34:03 | Re: Potential bug in postgres 8.2.4 |
Previous Message | Tom Lane | 2007-05-23 23:16:58 | Re: FATAL: cache lookup failed for function 1003 |