diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 185dc3eaf8d..4acac7366d9 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -1,4 +1,4 @@ - + <application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language @@ -133,9 +133,8 @@ PL/pgSQL functions can also be declared to return - a set, or table, of any data type they can return a single - instance of. Such a function generates its output by executing - RETURN NEXT for each desired element of the result + a set, or table. Such a function generates its output by + executing RETURN NEXT for each desired element of the result set, or by using RETURN QUERY to output the result of evaluating a query. @@ -1428,7 +1427,7 @@ BEGIN WHERE fooid > 0 LOOP -- can do some processing here - RETURN NEXT r; -- return next row of SELECT + RETURN NEXT r; -- return current row of SELECT END LOOP; RETURN; END