Re: IS NOT NULL and LEFT JOIN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: IS NOT NULL and LEFT JOIN
Дата
Msg-id 3181.1413813488@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: IS NOT NULL and LEFT JOIN  (Laurent Martelli <laurent.martelli@enercoop.org>)
Ответы Re: IS NOT NULL and LEFT JOIN  (Laurent Martelli <laurent.martelli@enercoop.org>)
Re: IS NOT NULL and LEFT JOIN  (David Rowley <dgrowleyml@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Laurent Martelli
Дата:
Сообщение: Re: IS NOT NULL and LEFT JOIN
Следующее
От: Marco Di Cesare
Дата:
Сообщение: Query with large number of joins