Fix alter_system_table test
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 3 Dec 2019 08:14:35 +0000 (09:14 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 3 Dec 2019 08:14:35 +0000 (09:14 +0100)
Add workaround for disabling ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS
warning for the test that tries to create a tablespace with a reserved
name.

Discussion: https://www.postgresql.org/message-id/flat/E1iacW7-0003h6-6U%40gemulon.postgresql.org

src/test/modules/unsafe_tests/expected/alter_system_table.out
src/test/modules/unsafe_tests/sql/alter_system_table.sql

index 09a557f837a876a7bd74fbf5b174c7937208f3f8..ca7eabe9bbccd4c348aeeba858de4cba45fb7171 100644 (file)
@@ -152,8 +152,10 @@ BEGIN;
 ALTER TABLE pg_description SET SCHEMA public;
 ROLLBACK;
 -- reserved tablespace name
+SET client_min_messages = error;  -- disable ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS warning
 CREATE TABLESPACE pg_foo LOCATION '/no/such/location';
 ERROR:  directory "/no/such/location" does not exist
+RESET client_min_messages;
 -- triggers
 CREATE TRIGGER t1 BEFORE INSERT ON pg_description EXECUTE FUNCTION tf1();
 ALTER TRIGGER t1 ON pg_description RENAME TO t2;
index 60769c8d51c3def5f17c94ac473b738d27565b81..44cb3c7148a92eebfd5dbb3bb0504ccd02f2d534 100644 (file)
@@ -166,7 +166,9 @@ ALTER TABLE pg_description SET SCHEMA public;
 ROLLBACK;
 
 -- reserved tablespace name
+SET client_min_messages = error;  -- disable ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS warning
 CREATE TABLESPACE pg_foo LOCATION '/no/such/location';
+RESET client_min_messages;
 
 -- triggers
 CREATE TRIGGER t1 BEFORE INSERT ON pg_description EXECUTE FUNCTION tf1();