Re: IS NOT NULL and LEFT JOIN - Mailing list pgsql-performance

From Tom Lane
Subject Re: IS NOT NULL and LEFT JOIN
Date
Msg-id 3181.1413813488@sss.pgh.pa.us
Whole thread Raw
In response to Re: IS NOT NULL and LEFT JOIN  (Laurent Martelli <laurent.martelli@enercoop.org>)
Responses Re: IS NOT NULL and LEFT JOIN
Re: IS NOT NULL and LEFT JOIN
List pgsql-performance
Laurent Martelli <laurent.martelli@enercoop.org> writes:
> Do we agree that both queries are identical ?

No, they *aren't* identical.  Go consult any SQL reference.  Left join
conditions don't work the way you seem to be thinking: after the join,
the RHS column might be null, rather than equal to the LHS column.

            regards, tom lane


pgsql-performance by date:

Previous
From: Laurent Martelli
Date:
Subject: Re: IS NOT NULL and LEFT JOIN
Next
From: Marco Di Cesare
Date:
Subject: Query with large number of joins