X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 63CB24758C9 for ; Thu, 27 Mar 2003 01:18:29 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id A9EE947580B for ; Thu, 27 Mar 2003 01:18:28 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h2R6IJub009389; Thu, 27 Mar 2003 01:18:19 -0500 (EST) To: Greg Stark Cc: Stephan Szabo , "Correia, Carla" , "'pgsql-sql@postgresql.org'" Subject: Re: Complex outer joins? In-reply-to: <878yv1l981.fsf@stark.dyndns.tv> References: <20030326145855.J66362-100000@megazone23.bigpanda.com> <878yv1l981.fsf@stark.dyndns.tv> Comments: In-reply-to Greg Stark message dated "26 Mar 2003 23:33:18 -0500" Date: Thu, 27 Mar 2003 01:18:19 -0500 Message-ID: <9388.1048745899@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/607 X-Sequence-Number: 12645 Greg Stark writes: > Yeah, that's not a particularly enlightening case because if you convert the > right joins to left joins you see that these aren't actually similar queries > at all. > the first is > "C left join (G left join L)" > and the second is > "G left join (C left join L)" > They only look similar superficially when written using right joins but > they're actually totally different structures. Yup, you're quite right. What's bothering me is that AFAICS they are extremely similar in the Oracle notation too: put the (*) on the other side of one of the equality clauses, and you convert one case to the other. So how can you assert that Oracle's notation is not sensitive to join order? regards, tom lane