if i give a query like this:

select name from table1 where id =ANY(select arraycol in table2) i get an error.
operator does not exist: integer = integer[]

However when in a stored procedure i take one parameter of type array and say something like this

select name from table1 where id =ANY(in_array_param)
everything goes fine..

can anyone guide me .please

Thanks