2 -- Tests for procedures / CALL syntax
4 CREATE PROCEDURE test_proc1()
10 -- error: can't return non-None
11 CREATE PROCEDURE test_proc2()
17 ERROR: PL/Python procedure did not return None
18 CONTEXT: PL/Python procedure "test_proc2"
19 CREATE TABLE test1 (a int);
20 CREATE PROCEDURE test_proc3(x int)
23 plpy.execute("INSERT INTO test1 VALUES (%s)" % x)
33 CREATE PROCEDURE test_proc5(INOUT a text)
38 CALL test_proc5('abc');
44 CREATE PROCEDURE test_proc6(a int, INOUT b int, INOUT c int)
49 CALL test_proc6(2, 3, 4);
56 CREATE PROCEDURE test_proc9(IN a int, OUT b int)
59 plpy.notice("a: %s" % (a))
63 DECLARE _a int; _b int;
66 CALL test_proc9(_a, _b);
67 RAISE NOTICE '_a: %, _b: %', _a, _b;
71 NOTICE: _a: 10, _b: 20
72 DROP PROCEDURE test_proc1;
73 DROP PROCEDURE test_proc2;
74 DROP PROCEDURE test_proc3;