1 CREATE PROCEDURE test_proc1()
10 CREATE PROCEDURE test_proc2()
19 CREATE TABLE test1 (a int);
21 CREATE PROCEDURE test_proc3(x int)
24 spi_exec_query("INSERT INTO test1 VALUES ($_[0])");
34 CREATE PROCEDURE test_proc5(INOUT a text)
38 return { a => "$a+$a" };
41 CALL test_proc5('abc');
44 CREATE PROCEDURE test_proc6(a int, INOUT b int, INOUT c int)
48 return { b => $b * $a, c => $c * $a };
51 CALL test_proc6(2, 3, 4);
56 CREATE PROCEDURE test_proc9(IN a int, OUT b int)
60 elog(NOTICE, "a: $a, b: $b");
61 return { b => $a * 2 };
65 DECLARE _a int; _b int;
68 CALL test_proc9(_a, _b);
69 RAISE NOTICE '_a: %, _b: %', _a, _b;
74 DROP PROCEDURE test_proc1;
75 DROP PROCEDURE test_proc2;
76 DROP PROCEDURE test_proc3;