From: Pavel Stehule on
Hello

there are maybe planner bug.

test case:

CREATE TABLE person (
id SERIAL PRIMARY KEY,
name VARCHAR(64)
) WITHOUT OIDS;

CREATE TABLE person_data (
id SERIAL PRIMARY KEY
) WITHOUT OIDS;

------------------------------------

SELECT name
FROM person
WHERE name IN (
SELECT name FROM person p
LEFT JOIN person_data ON p.id = person_data.id
)

postgres=# explain SELECT name
FROM person
WHERE name IN (
SELECT name FROM person p
LEFT JOIN person_data ON p.id = person_data.id);
ERROR: failed to build any 2-way joins

it works on 8.3

report by Vaclav Novotny

Regards

Pavel

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers