Order of precedence between AND and OR.

Поиск
Список
Период
Сортировка
От David Pradier
Тема Order of precedence between AND and OR.
Дата
Msg-id 20051125165259.GE4482@clarisys.fr
обсуждение исходный текст
Ответы Re: Order of precedence between AND and OR.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Hi everybody,

during the code inspection due to our migration to 8.1,
I found a piece of SQL code written like this :

WHERE a AND b OR c AND d

Now, I know that AND and OR are commutative because it's written in the
docs.
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.

Could somebody tell me or point me to the right doc ?

Thanks in advance,
David

-- 
David Pradier -- Directeur Technique de Clarisys Informatique -- Chef de projet logiciels libres / open-source


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Variable column names in PL/pgSQL RECORD referencces
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Order of precedence between AND and OR.