It may be simple but somehow, I still don't get it correct. How to pass array of strings into a function and use it in "IN" statement in SQL
CREATE OR REPLACE function test_function(array_para text)
RETURNS TABLE (data text)
AS $$
begin
return query select col1 from my_table where my_table.col2 in(array_para)
END
$$
LANGUAGE 'plpgsql';
and how can I call it? may be --
select test_function('''ABC'', ''MITT''')