Thread: beta testing - planner bug - ERROR: XX000: failed to build any 2-way joins

beta testing - planner bug - ERROR: XX000: failed to build any 2-way joins

From
Pavel Stehule
Date:
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


Pavel Stehule <pavel.stehule@gmail.com> writes:
> 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

Fixed, thanks.
        regards, tom lane