Postgres query to select all records that have at least one matching array value from another array Rough table structure:
id                      uuid
fields                  jsonb
created_at              timestamptz
related_content_ids     _uuid
updated_at              timestamptz

I'm trying to write a query that will find all records in this table that have at least one value from a specified array in the related_content_ids column.
Something like this works for matching all values in the array, but I just need at least one to match:
SELECT * FROM content WHERE related_content_ids @&gt; '{fbaa1235-1069-496f-9a54-e91e13aadae8,65a109eb-ee4b-4a23-9f91-6980b5bb9340}'
&quot;At least one match&quot; can be done using the &quot;overlaps&quot; operator &amp;&amp;
select *
from content
where related_content_ids &amp;&amp; '{fbaa1235-1069-496f-9a54-e91e13aadae8,65a109eb-ee4b-4a23-9f91-6980b5bb9340}'