Re: Order of precedence between AND and OR. - Mailing list pgsql-sql

From Tom Lane
Subject Re: Order of precedence between AND and OR.
Date
Msg-id 26190.1132948743@sss.pgh.pa.us
Whole thread Raw
In response to Order of precedence between AND and OR.  (David Pradier <david.pradier@clarisys.fr>)
List pgsql-sql
David Pradier <david.pradier@clarisys.fr> writes:
> But what I couldn't find is if there is an order of precedence between
> AND and OR, that is if the AND expression is calculated before the OR
> one, or anyelse way.

AND first; see
http://www.postgresql.org/docs/8.1/static/sql-syntax.html#SQL-PRECEDENCE
This is required by the SQL spec.

But you probably also want to read
http://www.postgresql.org/docs/8.1/static/sql-expressions.html#SYNTAX-EXPRESS-EVAL
        regards, tom lane


pgsql-sql by date:

Previous
From: David Pradier
Date:
Subject: Order of precedence between AND and OR.
Next
From: Vivek Khera
Date:
Subject: Re: sysid