I have a table with column of arrays that contains words in different cases. I can select all rows with required tag like this:
SELECT * FROM table WHERE 'tag' = ANY(tags::TEXT[]);
but how to take into account that words in arrays can also be in upper case?
UPDATE
that's how can I get all unique values from column of arrays:
SELECT DISTINCT LOWER(unnest)
FROM (SELECT unnest(tags) FROM table) AS all_tags;
maybe it will be helpful