Re: Multiple natural joins

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Multiple natural joins
Date: 2009-03-20 08:32:13
Message-ID: 49C3548D.3080002@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sam Mason wrote:
> On Thu, Mar 19, 2009 at 04:22:56PM +0200, Peter Eisentraut wrote:
>> Joins nest from left to write, so
>>
>> tbl_c NATURAL JOIN tbl_a NATURAL JOIN tbl_b
>>
>> means
>>
>> (tbl_c NATURAL JOIN tbl_a) NATURAL JOIN tbl_b
>>
>> If you want a different order, you can set the parentheses differently,
>> with possibly different results.
>
> When would you get different results? As far as I can tell, for INNER
> joins, you'd always get the same thing back for any ordering. With
> OUTER joins it obviously matters what's going on, but that's expected.

Right.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2009-03-20 09:37:28 Re: Fulltext - multiple single column indexes
Previous Message Tomasz Olszak 2009-03-20 08:17:46 Is there a method to Execute update in Pl/Pgsql function using rowtype variable