I'm trying to cast a list of ip addresses to ::inet
but only the last element in the list gets converted.
I've tried the following but nothing seems to work.
select * from ip_addresses where address in (:addresses::inet)
select * from ip_addresses where address in (:addresses)::inet
select * from ip_addresses where address in CAST (:addresses AS inet)
I can't simply cast the address::text
since matches can fail if the input addresses don't have a subnet specified.