]> granicus.if.org Git - postgresql/commitdiff
PL/pgSQL: Extend test case
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 23 Aug 2018 15:20:47 +0000 (17:20 +0200)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 23 Aug 2018 15:20:47 +0000 (17:20 +0200)
This test was supposed to check the interaction of INOUT and default
parameters in a procedure call, but it only checked the case where the
parameter was not supplied.  Now it also checks the case where the
parameter was supplied.  It was already working correctly, so no code
changes required.

src/pl/plpgsql/src/expected/plpgsql_call.out
src/pl/plpgsql/src/sql/plpgsql_call.sql

index a3592d7b821e914d2f4c5b1f3a6b1dbde3b82b99..547ca22a55aeb9c9e0f963b204a23cdb4f639ade 100644 (file)
@@ -233,12 +233,22 @@ BEGIN
   _a := 10; _b := 30; _c := 50;
   CALL test_proc8c(_a, b => _b);
   RAISE NOTICE '_a: %, _b: %, _c: %', _a, _b, _c;
+  _a := 10; _b := 30; _c := 50;
+  CALL test_proc8c(_a, _b, _c);
+  RAISE NOTICE '_a: %, _b: %, _c: %', _a, _b, _c;
+  _a := 10; _b := 30; _c := 50;
+  CALL test_proc8c(c => _c, b => _b, a => _a);
+  RAISE NOTICE '_a: %, _b: %, _c: %', _a, _b, _c;
 END
 $$;
 NOTICE:  a: 10, b: 30, c: 11
 NOTICE:  _a: 100, _b: 40, _c: 50
 NOTICE:  a: 10, b: 30, c: 11
 NOTICE:  _a: 100, _b: 40, _c: 50
+NOTICE:  a: 10, b: 30, c: 50
+NOTICE:  _a: 100, _b: 40, _c: -500
+NOTICE:  a: 10, b: 30, c: 50
+NOTICE:  _a: 100, _b: 40, _c: -500
 -- transition variable assignment
 TRUNCATE test1;
 CREATE FUNCTION triggerfunc1() RETURNS trigger
index a0b7bcb6e7c945968a87f9e60289f1da6f77aaea..29e85803e734b3a5e24e5d50dfb32c684390a48e 100644 (file)
@@ -212,6 +212,12 @@ BEGIN
   _a := 10; _b := 30; _c := 50;
   CALL test_proc8c(_a, b => _b);
   RAISE NOTICE '_a: %, _b: %, _c: %', _a, _b, _c;
+  _a := 10; _b := 30; _c := 50;
+  CALL test_proc8c(_a, _b, _c);
+  RAISE NOTICE '_a: %, _b: %, _c: %', _a, _b, _c;
+  _a := 10; _b := 30; _c := 50;
+  CALL test_proc8c(c => _c, b => _b, a => _a);
+  RAISE NOTICE '_a: %, _b: %, _c: %', _a, _b, _c;
 END
 $$;