For example this request returns error, because this data can't be encoded properly:
>> epgsql:equery(C, "select $1::my_custom_type[]", [[<<"foo">>, <<"bar">>]])
{error,{error,error,<<"22P02">>, <<"array value must start with \"{\" or dimension information">>, []}}
But at the same time the information about this type is available:
>> epgsql:parse(C, "select $1::my_custom_type[]", [])
{ok,#statement{name = [],
columns = [#column{name = <<"my_custom_type">>,
type = {unknown_oid,28008},
size = -1,modifier = -1,format = 0}],
types = [{unknown_oid,28008}]}}
May be I didn't find proper approach how to do it?