) explode --need to unnest the array so you can address individual parts of the composite type in the where clause
WHERE (explode.list_item).text = ‘hello’ –note the () are required around (table.column), even if table is omitted; i.e., “(list_item).text”
) --/IN
In may be worth it to define a
text = CompXYZ
custom equality function+operator then you could do this (in theory…):
… WHERE ‘hello’ = ANY(list)
Your main issue is that the ANY/ALL array operators operating on whole elements.
Tweak the above to output whatever specific data you need as written it outputs a single record from sample if any of the contained array elements matches.