[HACKERS] full join qualifications on 8.3.1 vs. 8.3.6

2009-07-21 Thread Andrew Gierth
Given:

select * from test1 full join test2 using (a,b) where b=1;

8.3.1 and CVS HEAD produce a plan in which the b=1 condition is pushed
down into each side of the join, but 8.3.6 and 8.3.7 do not.

Is this intentional? I wasn't able to identify anything applicable in
the release notes.

testcase used:
create table test1 (a integer, b integer, c text);
create table test2 (a integer, b integer, c text);
insert into test1 select i,i,i::text from generate_series(1,1) i;
insert into test2 select i,i,i::text from generate_series(1,1) i;
create index test1_idx on test1 (b);
create index test2_idx on test2 (b);
explain select * from test1 full join test2 using (a,b) where b = 1;

-- 
Andrew (irc:RhodiumToad)

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


Re: [HACKERS] full join qualifications on 8.3.1 vs. 8.3.6

2009-07-21 Thread Tom Lane
Andrew Gierth and...@tao11.riddles.org.uk writes:
 select * from test1 full join test2 using (a,b) where b=1;

 8.3.1 and CVS HEAD produce a plan in which the b=1 condition is pushed
 down into each side of the join, but 8.3.6 and 8.3.7 do not.

It does what you're expecting in 8.3 branch tip.

http://archives.postgresql.org/pgsql-committers/2009-04/msg00204.php

We're really overdue for a set of back-branch update releases :-(

regards, tom lane

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