Re: BUG ? or SQL miss understanding ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Manfred Koizar <mkoi-pg(at)aon(dot)at>
Cc: "Bogdan Vatkov" <bvatkov(at)globaltech-bg(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: BUG ? or SQL miss understanding ?
Date: 2004-05-04 12:19:14
Message-ID: 3159.1083673154@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Manfred Koizar <mkoi-pg(at)aon(dot)at> writes:
> In
> SELECT ... FROM a, b LEFT JOIN c ON (a.id = ...)
> the LEFT JOIN operator has higher precedence than the comma, so "a" is
> not part of the JOIN. Better use ANSI syntax consistently:

BTW, a lot of people coming from MySQL get this wrong. According to
what I've heard, MySQL considers JOIN to have the same precedence as
comma, so that the above would in fact work as the OP seems to expect.
However, MySQL is flatly in violation of the SQL standard on this
point :-(

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shane D. 2004-05-04 13:01:57 [Fwd: help building datetime from varchars]
Previous Message Tom Lane 2004-05-04 12:15:23 Re: pgsql documentation error ?