The query to find the cats are "red", "brown" and "aloof" is also wonderfully simple.
SELECT Count(*) FROM cats_array_text WHERE cat_tags @> ARRAY['red', 'brown', 'aloof'];Tags and Postgres Arrays, a Purrrfect Combination | Crunchy Data Blog 2023
@> 包含する ARRAY[1,4,3] @> ARRAY[3,1] t
https://www.postgresql.jp/docs/9.2/functions-array.html