Received: from spider.pilosoft.com (p55-222.acedsl.com [160.79.55.222]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8OGwYh19667 for ; Mon, 24 Sep 2001 12:58:34 -0400 (EDT) (envelope-from alex@pilosoft.com) Received: from localhost (alexmail@localhost) by spider.pilosoft.com (8.9.3/8.9.3) with ESMTP id NAA16662; Mon, 24 Sep 2001 13:00:23 -0400 (EDT) Date: Mon, 24 Sep 2001 13:00:23 -0400 (EDT) From: Alex Pilosov To: Stephan Szabo cc: pgsql-hackers@postgresql.org Subject: Re: [SQL] outer joins strangeness In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200109/642 X-Sequence-Number: 13521 [moved to hackers] On Mon, 24 Sep 2001, Stephan Szabo wrote: > > Postgres should understand that left outer join does not constrict join > > order... > > But it can. If your condition was a joining between the other table > and the right side of the left outer join, you'd have the same condition > as a right outer join and the left side. The real condition I think > is that you can join a non-explicitly joined table to the side of an > outer join before the outer join but not to the other side. Yes yes. Maybe I was imprecise. Right join and left join are the same, only the ordering is different. Lets call the table that will always be included in a join a "complete" table. Then, joins should not impose join order on "complete" table. Of course, joins against 'incomplete' table must be done only after outer join is done. Anyone who can actually fix it? :) -alex