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.
master
Tom Lane 1 day ago
parent 9a71989a8f
commit 88824e6861
  1. 8
      src/test/modules/unsafe_tests/expected/setconfig.out
  2. 4
      src/test/modules/unsafe_tests/sql/setconfig.sql

@ -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;

@ -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

Loading…
Cancel
Save