The following operators are supported:
Operator Description +addition -subtraction *multiplication /division %modulus
Operator Description =equals <less than >greater than <=less than or equal to >=greater than or equal to <> or !=not equal INtrue if the preceding expression's value is in the listcolumn IN ('a', 'list', 'of', 'values') NOT INtrue if the preceding expression's value is not in the listcolumn NOT IN ('a', 'list', 'of', 'values')
We also support the BETWEEN operator for checking a value is in an inclusive range: a [NOT] BETWEEN b AND c.
Pattern matching operators New
Operator Description LIKEtrue if the string matches the pattern (case-sensitive)column LIKE 'pattern%' NOT LIKEtrue if the string does not match the pattern (case-sensitive)column NOT LIKE 'pattern%' ILIKEtrue if the string matches the pattern (case-insensitive)column ILIKE 'pattern%' NOT ILIKEtrue if the string does not match the pattern (case-insensitive)column NOT ILIKE 'pattern%'
Pattern matching supports two wildcard characters:
% matches any sequence of zero or more characters
_ matches any single character
Examples:
-- Match strings starting with "error"
WHERE blob1 LIKE 'error%'
-- Match strings ending with ".jpg" (case-insensitive)
WHERE blob2 ILIKE '%.jpg'
-- Match strings containing "test" anywhere
WHERE blob3 LIKE '%test%'
-- Match exactly 5 characters starting with "log"
-- Exclude strings containing "debug" (case-insensitive)
WHERE blob5 NOT ILIKE '%debug%'
Operator Description ANDboolean "AND" (true if both sides are true) ORboolean "OR" (true if either side or both sides are true) NOTboolean "NOT" (true if following expression is false and visa-versa)
Operator Description -negation operator (for example, -42)