Re: BUG #5263: Query execution fails with "ERROR: FULL JOIN is only supported with merge-joinable join conditions"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jozsef Szalay" <jszalay(at)storediq(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5263: Query execution fails with "ERROR: FULL JOIN is only supported with merge-joinable join conditions"
Date: 2010-01-05 21:17:15
Message-ID: 15477.1262726235@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Jozsef Szalay" <jszalay(at)storediq(dot)com> writes:
> Execute the following query:

> SELECT *
> FROM (SELECT id, 0 AS value
> FROM test
> WHERE description = 'abc'
> ) t1
> FULL OUTER JOIN
> (SELECT id, 1 AS value
> FROM test
> WHERE description = 'def'
> ) t2 USING (id, value);

Hm. It's reducing the join condition to constant FALSE (since 0<>1) and
then deciding it doesn't know how to join in that case. While this is
certainly undesirable, I have to wonder about the purpose of the query.
It seems like this is just a remarkably inefficient way of performing
UNION ALL. Do you have a more real-world case where it happens?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jozsef Szalay 2010-01-05 22:20:18 Re: BUG #5263: Query execution fails with "ERROR: FULL JOIN is only supported with merge-joinable join conditions"
Previous Message robson 2010-01-05 19:21:15 BUG #5266: erros no servidor web