Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 33EC22E004A for ; Wed, 28 May 2008 10:37:01 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 97505-05 for ; Wed, 28 May 2008 10:36:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail137079.authsmtp.co.uk (outmail137079.authsmtp.co.uk [62.13.137.79]) by developer.postgresql.org (Postfix) with ESMTP id F3CBF2E0057 for ; Wed, 28 May 2008 10:36:42 -0300 (ADT) Received: from mail-c188.authsmtp.com (mail-c188.authsmtp.com [62.13.128.25]) by punt4.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m4SDaega098721; Wed, 28 May 2008 14:36:40 +0100 (BST) Received: from [192.168.0.3] (85-211-226-243.dyn.gotadsl.co.uk [85.211.226.243]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m4SDactK078377; Wed, 28 May 2008 14:36:38 +0100 (BST) Subject: Re: Outer joins and equivalence From: Simon Riggs To: Matthew Wakeling Cc: pgsql-performance In-Reply-To: References: <1211918358.4489.257.camel@ebony.site> Content-Type: text/plain Date: Wed, 28 May 2008 14:39:10 +0100 Message-Id: <1211981950.4489.473.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: 1992f9ce-2cbb-11dd-aecc-001871e930f4 X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFag1bYFhI HGQLW1xEUVl7WmV/ aAMfZQBDYEtPQQdo VlZLRlFNFgBqBAMB SEMaMW0jJEE9eHl4 ZkFlEHFbWUY0dE90 QBhdRjgbZzQyOn0e URQMalIBI1BXfh9E Yld+AXoOYTMDKBg1 TUcABx0LExJlDREd ZRwRIEhaQ0EKGCV0 ThYOVTg2AEwbTiE+ KRcrQmMy X-Authentic-SMTP: 61633235383639.cat.dmpriest.net.uk:1045/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/352 X-Sequence-Number: 30320 On Wed, 2008-05-28 at 11:45 +0100, Matthew Wakeling wrote: > On Tue, 27 May 2008, Simon Riggs wrote: > > I do recognise that we would *not* be able to deduce this form of SQL > > > > A JOIN B ON (a.id = c.id) LEFT JOIN C ON (b.id = c.id) > > Surely that would not be valid SQL? You are right, but my point was about inferences during SQL planning, not about initial analysis of the statement. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support