im using postgresql 11.2 on a docker container and im trying to get data on this column that containes arrays "event_type" :
event_type
-----------------
{ERROR}
{INFO}
{ERROR,VERBOSE}
{ERROR,VERBOSE}
{INFO,NOTIFY}
event_type column schema :
event_type | text[]
Selecting all rows which contained 'ERROR': (works fine)
SELECT event_type FROM events WHERE event_type @> ARRAY['ERROR'];
event_type
-----------------
{ERROR}
{ERROR,VERBOSE}
{ERROR,VERBOSE}
(3 rows)
If i want to get all rows which contained 'ERROR' AND \ OR ' NOTIFY' :
SELECT event_type FROM events WHERE event_type @> ARRAY['ERROR', 'NOTIFY'];
event_type
------------
(0 rows)
The desired response would be :
event_type
-----------------
{ERROR}
{ERROR,VERBOSE}
{ERROR,VERBOSE}
{INFO,NOTIFY}