to worry about that, since FOR loops automatically use a cursor
internally to avoid memory problems.) A more interesting usage is to
return a reference to a cursor that it has created, allowing the
- caller to read the rows. This provides one way of returning multiple
- rows and columns from a function.
+ caller to read the rows. This provides a way to return row sets
+ from functions.
reffunc2
--------------------
- >unnamed cursor 1<
+ <unnamed cursor 1>
(1 row)
-FETCH ALL IN ">unnamed cursor 1<";
+FETCH ALL IN "<unnamed cursor 1>";
COMMIT;