aboutsummaryrefslogtreecommitdiff
path: root/src/pl/plperl/sql/plperl_call.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plperl/sql/plperl_call.sql')
-rw-r--r--src/pl/plperl/sql/plperl_call.sql22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/pl/plperl/sql/plperl_call.sql b/src/pl/plperl/sql/plperl_call.sql
index bd2b63b4185..2cf5461fefd 100644
--- a/src/pl/plperl/sql/plperl_call.sql
+++ b/src/pl/plperl/sql/plperl_call.sql
@@ -29,6 +29,28 @@ CALL test_proc3(55);
SELECT * FROM test1;
+-- output arguments
+
+CREATE PROCEDURE test_proc5(INOUT a text)
+LANGUAGE plperl
+AS $$
+my ($a) = @_;
+return { a => "$a+$a" };
+$$;
+
+CALL test_proc5('abc');
+
+
+CREATE PROCEDURE test_proc6(a int, INOUT b int, INOUT c int)
+LANGUAGE plperl
+AS $$
+my ($a, $b, $c) = @_;
+return { b => $b * $a, c => $c * $a };
+$$;
+
+CALL test_proc6(2, 3, 4);
+
+
DROP PROCEDURE test_proc1;
DROP PROCEDURE test_proc2;
DROP PROCEDURE test_proc3;