mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user