summaryrefslogtreecommitdiff
path: root/doc/src/sgml/plperl.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/plperl.sgml')
-rw-r--r--doc/src/sgml/plperl.sgml14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml
index cff7a847dee..518a86459ad 100644
--- a/doc/src/sgml/plperl.sgml
+++ b/doc/src/sgml/plperl.sgml
@@ -279,6 +279,20 @@ SELECT * FROM perl_row();
</para>
<para>
+ Similarly, output arguments of procedures can be returned as a hash
+ reference:
+
+<programlisting>
+CREATE PROCEDURE perl_triple(INOUT a integer, INOUT b integer) AS $$
+ my ($a, $b) = @_;
+ return {a =&gt; $a * 3, b =&gt; $b * 3};
+$$ LANGUAGE plperl;
+
+CALL perl_triple(5, 10);
+</programlisting>
+ </para>
+
+ <para>
PL/Perl functions can also return sets of either scalar or
composite types. Usually you'll want to return rows one at a
time, both to speed up startup time and to keep from queuing up