Function to select column values by comparing against comma separated list
问题 I want to compare my comma delimited string with column values. I did the following, which is not returning the expected result. ll = '"Java,CPP"' is coming dynamically. create or replace function testing(ll text) returns void as $body$ Declare foo text[]; ko text[]; BEGIN select unique_code into foo from codings where unique_code = ANY (regexp_split_to_array(ll, '\,')); raise info '%',foo; END; $body$ Language plpgsql; I got below error ERROR: column "Java,CPP" does not exist LINE 1: SELECT