Betsy Barker <betsy(dot)barker(at)supportservicesinc(dot)com> writes:
> Here is the call:
> FOR getpercentiles IN EXECUTE ''SELECT * FROM get_facility_percentiles(''||wagerateid_list||'')'' LOOP
> -- RAISE NOTICE ''DONE CALLING FUNCTION '';
> END LOOP;
You want something like
FOR getpercentiles IN EXECUTE ''SELECT * FROM get_facility_percentiles(''||quote_literal(wagerateid_list)||'')'' LOOP
regards, tom lane