Hello i am writting a pgsql function and inside this function , i have one request with array_to_string method.
AND id NOT IN (array_to_string(excludeArcs,','))
Your query is equivalent to
id NOT IN( '1,2,3' ). You can not compare ID with string.
It is necessary to expand the array to the table:
AND id NOT IN(select * from unnest(excludeArcs))