The parentheses rules of PostgreSQL, is there a summarized guide?
In Mathematics and many programming languages (and I think standard SQL as well), parentheses change precedence (grouping parts to be evaluated first) or to enhance readability (for human eyes). Equivalent Examples: SELECT array[1,2] @> array[1] SELECT (array[1,2]) @> array[1] SELECT array[1,2] @> (array[1]) SELECT ((array[1,2]) @> (array[1])) But SELECT 1 = ANY array[1,2] is a syntax error (!), and SELECT 1 = ANY (array[1,2]) is valid. Why? OK, because "the manual says so" . But what the logic for humans to remember all exceptions? Is there a guide about it? I do not understand why