Is there an operator in PostgreSQL to test whether an element is in an array?
Currently, I'm doing such tests in a slightly complex way by first constructing a singleton array for the element and then using the <@
operator between arrays.
SELECT ARRAY[1] <@ ARRAY[1,2,3];
( SELECT 1 <@ ARRAY[1,2,3];
does not work).
Is there a more succinct/clear way?