diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-06-15 14:59:07 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-06-15 14:59:07 -0400 |
commit | 12f862099d25fc70b412d56f50dcabebff8db44a (patch) | |
tree | bf732ccde0885a236f3d7a102858742e9d6b4586 | |
parent | e472ce9624e0f2083c8fd25ea1acb081be908f8f (diff) | |
download | postgresql-12f862099d25fc70b412d56f50dcabebff8db44a.tar.gz postgresql-12f862099d25fc70b412d56f50dcabebff8db44a.zip |
Fix regression test for force_parallel_mode=on.
Commit 14a254fb52423c57059851abafbd1247261f7f03 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.
-rw-r--r-- | src/test/regress/expected/select_parallel.out | 13 | ||||
-rw-r--r-- | src/test/regress/sql/select_parallel.sql | 8 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/test/regress/expected/select_parallel.out b/src/test/regress/expected/select_parallel.out index b19dc1b2f0e..709e64e038e 100644 --- a/src/test/regress/expected/select_parallel.out +++ b/src/test/regress/expected/select_parallel.out @@ -44,11 +44,12 @@ explain (costs off) do $$begin -- Provoke error in worker. The original message CONTEXT contains a worker - -- PID that must be hidden in the test output. PL/pgSQL conveniently - -- substitutes its own CONTEXT. - select stringu1::int2 from tenk1 where unique1 = 1; + -- PID that must be hidden in the test output. + perform stringu1::int2 from tenk1 where unique1 = 1; + exception + when others then + raise 'SQLERRM: %', sqlerrm; end$$; -ERROR: invalid input syntax for integer: "BAAAAA" -CONTEXT: SQL statement "select stringu1::int2 from tenk1 where unique1 = 1" -PL/pgSQL function inline_code_block line 5 at SQL statement +ERROR: SQLERRM: invalid input syntax for integer: "BAAAAA" +CONTEXT: PL/pgSQL function inline_code_block line 7 at RAISE rollback; diff --git a/src/test/regress/sql/select_parallel.sql b/src/test/regress/sql/select_parallel.sql index 1cd4a700f19..ef188489579 100644 --- a/src/test/regress/sql/select_parallel.sql +++ b/src/test/regress/sql/select_parallel.sql @@ -21,9 +21,11 @@ explain (costs off) do $$begin -- Provoke error in worker. The original message CONTEXT contains a worker - -- PID that must be hidden in the test output. PL/pgSQL conveniently - -- substitutes its own CONTEXT. - select stringu1::int2 from tenk1 where unique1 = 1; + -- PID that must be hidden in the test output. + perform stringu1::int2 from tenk1 where unique1 = 1; + exception + when others then + raise 'SQLERRM: %', sqlerrm; end$$; rollback; |