David Pradier <david(dot)pradier(at)clarisys(dot)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