Given this example:
Table:
CREATE TABLE public.animals
(
name character varying(64),
whitelist animal_whitelist[]
)
Custom enum type animal_whitelist:
CREATE TYPE public.animal_whitelist AS ENUM
('dog',
'cat',
'bird');
How can I select specifically to the white list.
In pseudo code this is what I would like to select.
- Any rows where the
animal_whitelist
equalsdog
- Any rows where the
animal_whitelist
equalsdog
andcat
- Any rows where the
animal_whitelist
equalsdog
orcat
- Any rows where the
animal_whitelist
is notdog
,cat
, orbird
@>
gets me close