diff --git a/src/test/regress/expected/select_parallel.out b/src/test/regress/expected/select_parallel.out
index b19dc1b..d5b9fe5 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.
+  -- PID that must be hidden in the test output.
   select 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 1cd4a70..b8b30f6 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.
+  -- PID that must be hidden in the test output.
   select stringu1::int2 from tenk1 where unique1 = 1;
+  exception
+	when others then
+		raise 'SQLERRM: %', sqlerrm;
 end$$;
 
 rollback;
