PostgreSQL - PL/pgSQL Fundamentals
You wrote this function:
What is the problem with this function?
CREATE FUNCTION test_func() RETURNS SETOF integer AS $$ DECLARE i integer := 1; BEGIN RETURN i; RETURN NEXT i + 1; END; $$ LANGUAGE plpgsql;
What is the problem with this function?
