Qingqing Zhou zhouqq.postg...@gmail.com writes:
[ this fails: ]
set enable_mergejoin=on; set enable_nestloop=off; set enable_hashjoin=off;
explain analyze select a, b from t1 left join t2 on coalesce(a, 1) =
coalesce(b,1) where (coalesce(b,1))0
Ugh. The core of the problem is a mistaken
The symptom is that the same join query yield different results with
MJ and NLJ/HJ. Here is a repro:
---
create table t1(a int);create table t2(b int);
insert into t1 values(10); insert into t2 values(2);
analyze t1; analyze t2;
set enable_mergejoin=on; set enable_nestloop=off; set