Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 12f8620

Browse files
committed
Fix regression test for force_parallel_mode=on.
Commit 14a254f managed not to exercise the code it was intended to test, and the comment explaining why no "parallel worker" line showed up in the context wasn't right. Amit Kapila, tweaked by me per Amit's analysis.
1 parent e472ce9 commit 12f8620

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

src/test/regress/expected/select_parallel.out

+7-6
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ explain (costs off)
4444

4545
do $$begin
4646
-- Provoke error in worker. The original message CONTEXT contains a worker
47-
-- PID that must be hidden in the test output. PL/pgSQL conveniently
48-
-- substitutes its own CONTEXT.
49-
select stringu1::int2 from tenk1 where unique1 = 1;
47+
-- PID that must be hidden in the test output.
48+
perform stringu1::int2 from tenk1 where unique1 = 1;
49+
exception
50+
when others then
51+
raise 'SQLERRM: %', sqlerrm;
5052
end$$;
51-
ERROR: invalid input syntax for integer: "BAAAAA"
52-
CONTEXT: SQL statement "select stringu1::int2 from tenk1 where unique1 = 1"
53-
PL/pgSQL function inline_code_block line 5 at SQL statement
53+
ERROR: SQLERRM: invalid input syntax for integer: "BAAAAA"
54+
CONTEXT: PL/pgSQL function inline_code_block line 7 at RAISE
5455
rollback;

src/test/regress/sql/select_parallel.sql

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ explain (costs off)
2121

2222
do $$begin
2323
-- Provoke error in worker. The original message CONTEXT contains a worker
24-
-- PID that must be hidden in the test output. PL/pgSQL conveniently
25-
-- substitutes its own CONTEXT.
26-
select stringu1::int2 from tenk1 where unique1 = 1;
24+
-- PID that must be hidden in the test output.
25+
perform stringu1::int2 from tenk1 where unique1 = 1;
26+
exception
27+
when others then
28+
raise 'SQLERRM: %', sqlerrm;
2729
end$$;
2830

2931
rollback;

0 commit comments

Comments
 (0)