diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2025-09-12 18:45:06 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2025-09-12 18:45:06 -0400 |
commit | 88824e68611a88a4ef7218c093810a94f86e12e0 (patch) | |
tree | fe3832f8f1c78aa6b117cb9a6a15400594e72eb4 | |
parent | 9a71989a8f61d7ee003c443a979a1bd43a08ff63 (diff) |
Avoid context dependency in test case added by 9a71989a8.
It's not quite clear to me why this didn't show up in my local
check-world testing, but some of the buildfarm evidently runs
this test with a different database name. Adjust the test
so that that doesn't affect the reported error messages.
-rw-r--r-- | src/test/modules/unsafe_tests/expected/setconfig.out | 8 | ||||
-rw-r--r-- | src/test/modules/unsafe_tests/sql/setconfig.sql | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/test/modules/unsafe_tests/expected/setconfig.out b/src/test/modules/unsafe_tests/expected/setconfig.out index 37e33709012..5318f075d1e 100644 --- a/src/test/modules/unsafe_tests/expected/setconfig.out +++ b/src/test/modules/unsafe_tests/expected/setconfig.out @@ -63,18 +63,18 @@ SET ROLE NONE; DO $$BEGIN EXECUTE format( 'ALTER DATABASE %I RESET role', current_catalog); END$$; -- Test some error cases +-- We have to use terse mode so that the database name doesn't +-- appear in the error output. +\set VERBOSITY terse DO $$BEGIN EXECUTE format( 'ALTER DATABASE %I SET bogus = 0', current_catalog); END$$; ERROR: unrecognized configuration parameter "bogus" -CONTEXT: SQL statement "ALTER DATABASE contrib_regression SET bogus = 0" -PL/pgSQL function inline_code_block line 1 at EXECUTE DO $$BEGIN EXECUTE format( 'ALTER DATABASE %I RESET bogus', current_catalog); END$$; ERROR: unrecognized configuration parameter "bogus" -CONTEXT: SQL statement "ALTER DATABASE contrib_regression RESET bogus" -PL/pgSQL function inline_code_block line 1 at EXECUTE ALTER USER regress_authenticated_user_db_ssa RESET bogus; ERROR: unrecognized configuration parameter "bogus" +\set VERBOSITY default -- Test connection string options \c -reuse-previous=on "user=regress_authenticated_user_db_sr options=-crole=regress_current_user" SELECT current_user, session_user; diff --git a/src/test/modules/unsafe_tests/sql/setconfig.sql b/src/test/modules/unsafe_tests/sql/setconfig.sql index d9e1fc908a1..4349490f941 100644 --- a/src/test/modules/unsafe_tests/sql/setconfig.sql +++ b/src/test/modules/unsafe_tests/sql/setconfig.sql @@ -51,12 +51,16 @@ DO $$BEGIN EXECUTE format( -- Test some error cases +-- We have to use terse mode so that the database name doesn't +-- appear in the error output. +\set VERBOSITY terse DO $$BEGIN EXECUTE format( 'ALTER DATABASE %I SET bogus = 0', current_catalog); END$$; DO $$BEGIN EXECUTE format( 'ALTER DATABASE %I RESET bogus', current_catalog); END$$; ALTER USER regress_authenticated_user_db_ssa RESET bogus; +\set VERBOSITY default -- Test connection string options |