Skip site navigation (1) Skip section navigation (2)

RIGHT JOIN is only supported with merge-joinable join conditions, PostgreSQL 8.1 beta3

From: "Jean-Pierre Pelletier" <pelletier_32(at)sympatico(dot)ca>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: RIGHT JOIN is only supported with merge-joinable join conditions, PostgreSQL 8.1 beta3
Date: 2005-10-25 16:02:34
Message-ID: BAYC1-PASMTP05113F14E40190BC1E369195760@CEZ.ICE (view raw or flat)
Thread:
Lists: pgsql-bugs
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 


Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-10-25 17:28:00
Subject: Re: BUG #1993: Adding/subtracting negative time intervals
Previous:From: Alvaro HerreraDate: 2005-10-25 14:27:51
Subject: Re: BUG #1998: transaction locks parent record when it shouldn't

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group