I pass an array of strings to the procedure, inside I need to create a new array with queries and return it. But how to do that?
DROP FUNCTION selectnamedate(text[]); CREATE OR REPLACE FUNCTION selectnamedate(Names text[]) RETURNS text[] AS $$ DECLARE name varchar; count text[]; BEGIN FOR name IN SELECT * FROM Names LOOP count END LOOP; return count; END; $$ LANGUAGE plpgsql; Here is where just count I can not find how to do it? Also I generally correctly declare function that?