Hi,

I have a query that throws error "RIGHT JOIN is only supported with merge-joinable join conditions".
This should allow it to be reproduce.

create table table1 (t1id integer not null, extension integer not null);
create table table2 (t1id integer not null, t3id integer not null, original integer not null, replacement integer not null);
create table table3 (t3id integer not null);
create unique index table3ix1 on table3 (t3id);
insert into table3 select * from generate_series(1,10000);

select
  count(table3.*)
from
  table1

  inner join table2
  on table1.t1id = table2.t1id
  and table1.extension in (table2.original, table2.replacement)

  left outer join table3
  on table2.t3id = table3.t3id
  and table1.extension in (table2.replacement);

I am on PostgreSQL 8.1 beta3 under Windows XP Service Pack 2.

Thanks
Jean-Pierre Pelletier
e-djuster

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to