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

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: swap relations to be able to execute a left join
Дата
Msg-id 20051209192902.GA95782@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: swap relations to be able to execute a left join  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: swap relations to be able to execute a left join  (David Rio Deiros <driodeiros@gmail.com>)
Список pgsql-general
On Fri, Dec 09, 2005 at 02:17:59PM -0500, Tom Lane wrote:
> Michael Fuhr <mike@fuhr.org> writes:
> > Hmm...I get errors in MySQL 5.0.16 with the query as posted so I
> > have to wonder what the real query was.
>
> (tries it...)  After removing the bogus comma, MySQL 4.1.14 swallows
> the query without complaint, so it would seem that MySQL finally fixed
> this bug at 5.0.  I wonder what the OP's coworker will say when he tries
> to migrate his code to 5.0 ...

Here we go:

http://dev.mysql.com/doc/refman/5.0/en/join.html

"Before MySQL 5.0.12, the comma operator (,) and JOIN both had the same
precedence, so the join expression t1, t2 JOIN t3 was intrepreted as
((t1, t2) JOIN t3). Now JOIN has higher precedence, so the expression is
interpreted as (t1, (t2 JOIN t3))."

--
Michael Fuhr

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: swap relations to be able to execute a left join
Следующее
От: David Rio Deiros
Дата:
Сообщение: Re: swap relations to be able to execute a left join