|
1 | | -<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.118 2007/11/2815:42:31 petere Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.119 2007/11/2820:13:06 momjian Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="plpgsql"> |
4 | 4 | <title><application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language</title> |
|
133 | 133 |
|
134 | 134 | <para> |
135 | 135 | <application>PL/pgSQL</> functions can also be declared to return |
136 | | - a <quote>set</>, or table, of any data type they can return a single |
137 | | - instance of. Such a function generates its output by executing |
138 | | - <command>RETURN NEXT</> for each desired element of the result |
| 136 | + a <quote>set</>, or table. Such a function generates its output by |
| 137 | + executing <command>RETURN NEXT</> for each desired element of the result |
139 | 138 | set, or by using <command>RETURN QUERY</> to output the result of |
140 | 139 | evaluating a query. |
141 | 140 | </para> |
@@ -1428,7 +1427,7 @@ BEGIN |
1428 | 1427 | WHERE fooid > 0 |
1429 | 1428 | LOOP |
1430 | 1429 | -- can do some processing here |
1431 | | - RETURN NEXT r; -- returnnext row of SELECT |
| 1430 | + RETURN NEXT r; -- returncurrent row of SELECT |
1432 | 1431 | END LOOP; |
1433 | 1432 | RETURN; |
1434 | 1433 | END |
|