I am trying to cast a list of strings to a list of custom enum types. The effect I am looking for can be achieved with this:
select * from table_1 where column_a in (cast('ENUM1' AS custom_enum), cast('ENUM2' AS custom_enum))
But since I am attempting this to bypass some JPA/hibernate issues I am having with annotated filters on sql enum types, I need to dynamically add the enum strings to the list. So I am trying to figure out how to cast a whole list of strings to a list of enum_types. I'm guessing something like this:
select * from table_1 where column_a in (cast({'ENUM1', 'ENUM2'} AS custom_enum[]))
But not much I have tried gives me any luck.