Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd2cc897

Browse files
committed
PL/pgSQL: Extend test case
This test was supposed to check the interaction of INOUT and defaultparameters in a procedure call, but it only checked the case where theparameter was not supplied. Now it also checks the case where theparameter was supplied. It was already working correctly, so no codechanges required.
1 parentd10f774 commitd2cc897

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,22 @@ BEGIN
233233
_a := 10; _b := 30; _c := 50;
234234
CALL test_proc8c(_a, b => _b);
235235
RAISE NOTICE '_a: %, _b: %, _c: %', _a, _b, _c;
236+
_a := 10; _b := 30; _c := 50;
237+
CALL test_proc8c(_a, _b, _c);
238+
RAISE NOTICE '_a: %, _b: %, _c: %', _a, _b, _c;
239+
_a := 10; _b := 30; _c := 50;
240+
CALL test_proc8c(c => _c, b => _b, a => _a);
241+
RAISE NOTICE '_a: %, _b: %, _c: %', _a, _b, _c;
236242
END
237243
$$;
238244
NOTICE: a: 10, b: 30, c: 11
239245
NOTICE: _a: 100, _b: 40, _c: 50
240246
NOTICE: a: 10, b: 30, c: 11
241247
NOTICE: _a: 100, _b: 40, _c: 50
248+
NOTICE: a: 10, b: 30, c: 50
249+
NOTICE: _a: 100, _b: 40, _c: -500
250+
NOTICE: a: 10, b: 30, c: 50
251+
NOTICE: _a: 100, _b: 40, _c: -500
242252
-- transition variable assignment
243253
TRUNCATE test1;
244254
CREATE FUNCTION triggerfunc1() RETURNS trigger

‎src/pl/plpgsql/src/sql/plpgsql_call.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ BEGIN
212212
_a :=10; _b :=30; _c :=50;
213213
CALL test_proc8c(_a, b=> _b);
214214
RAISE NOTICE'_a: %, _b: %, _c: %', _a, _b, _c;
215+
_a :=10; _b :=30; _c :=50;
216+
CALL test_proc8c(_a, _b, _c);
217+
RAISE NOTICE'_a: %, _b: %, _c: %', _a, _b, _c;
218+
_a :=10; _b :=30; _c :=50;
219+
CALL test_proc8c(c=> _c, b=> _b, a=> _a);
220+
RAISE NOTICE'_a: %, _b: %, _c: %', _a, _b, _c;
215221
END
216222
$$;
217223

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp