Re: swap relations to be able to execute a left join

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: swap relations to be able to execute a left join
Дата
Msg-id 29660.1134150439@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: swap relations to be able to execute a left join  (Jaime Casanova <systemguards@gmail.com>)
Ответы Re: swap relations to be able to execute a left join  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Jaime Casanova <systemguards@gmail.com> writes:
> On 12/9/05, David Rio Deiros <driodeiros@gmail.com> wrote:
>> I am sure there is a good reason why you have to swap the relations
>> in PostgreSQL. Anyone?

> Because PostgreSQL is not broken...

> What i see in this SELECT is an LEFT JOIN between AT and U (note that
> the other relations in the FROM are separated by commas so they have
> nothing to do with LEFT JOIN) and is using a JOIN clause from a
> relation that has nothing to do with the LEFT JOIN...

Right.  MySQL apparently thinks that JOIN has the same precedence as
comma in a FROM-list, but anyone who has bothered to read the SQL
standard knows that JOIN is supposed to bind tighter than comma.
Your coworker is depending on a flat-out-incorrect behavior of MySQL.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: swap relations to be able to execute a left join
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: swap relations to be able to execute a left join