You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Operator precedence is inconsistent with modern PG (and PG 7.2) #22461
- * / %
- + -
- (any other operator: ||, regex, bitwise)
- BETWEEN IN LIKE ILIKE SIMILAR (non-assoc)
- < > = <= >= <> (non-assoc, all six together)
- IS ISNULL NOTNULL (incl. IS DISTINCT FROM)
- NOT, AND, OR
We claim to match Postgres 7.2, which does:
- IS, ISNULL, NOTNULL (rank 6 — high)
- (any other operator — ||, regex, bitwise, and <=, >=, <> since they aren't listed) (rank 7)
- LIKE ILIKE (rank 11)
- < > (rank 12)
- = (rank 13)
So we're consistent with neither version of Postgres. I'd argue we should move to be consistent with modern Postgres.
Activity
neilconway commentedon May 22, 2026
take