Hans-Jürgen Schönig <postgres@cybertec.at> writes:
> CREATE OR REPLACE FUNCTION xy(int4) RETURNS SETOF RECORD AS '
> ...
> RETURN v_rec;
> ...
> ' LANGUAGE 'plpgsql';
> ERROR: RETURN cannot have a parameter in function returning set; use
> RETURN NEXT at or near "v_rec" at character 324
You were never supposed to do that, although prior releases did not
check for the mistake. See
http://www.postgresql.org/docs/7.4/static/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING
: When a PL/pgSQL function is declared to return SETOF sometype, the
: procedure to follow is slightly different. In that case, the individual
: items to return are specified in RETURN NEXT commands, and then a final
: RETURN command with no argument is used to indicate that the function
: has finished executing.
> ERROR: function xy(integer) does not exist
> HINT: No function matches the given name and argument types. You may
> need to add explicit type casts.
8.0 not only detects the error, but does so during CREATE FUNCTION
(because it's treated as a syntax error).
regards, tom lane