postgres extension intarray - ghdrako/doc_snipets GitHub Wiki
- https://www.postgresql.org/docs/current/intarray.html
- https://www.postgresql.org/docs/current/arrays.html
create extension intarray;
The@@
and ~~
operators test whether an array satisfies a query, which is expressed as a value of a specialized data typequery_int.
A query consists of integer values that are checked against the elements of the array, possibly combined using the operators & (AND), | (OR), and ! (NOT). Parentheses can be used as needed.
For example, the query 1&(2|3)
matches arrays that contain 1 and also contain either 2 or 3.