summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2019-12-03 09:14:35 +0100
committerPeter Eisentraut <peter@eisentraut.org>2019-12-03 09:14:35 +0100
commit88d45ac752ae49dbfafeb163b07381d3b8a6b601 (patch)
tree83741e5fb6782b16d134b13b5be3b8be0cd95ddc
parent9989d37d1c8dff12f20a1de8e1f470093136c893 (diff)
Fix alter_system_table test
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
-rw-r--r--src/test/modules/unsafe_tests/expected/alter_system_table.out2
-rw-r--r--src/test/modules/unsafe_tests/sql/alter_system_table.sql2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/test/modules/unsafe_tests/expected/alter_system_table.out b/src/test/modules/unsafe_tests/expected/alter_system_table.out
index 09a557f837a..ca7eabe9bbc 100644
--- a/src/test/modules/unsafe_tests/expected/alter_system_table.out
+++ b/src/test/modules/unsafe_tests/expected/alter_system_table.out
@@ -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;
diff --git a/src/test/modules/unsafe_tests/sql/alter_system_table.sql b/src/test/modules/unsafe_tests/sql/alter_system_table.sql
index 60769c8d51c..44cb3c7148a 100644
--- a/src/test/modules/unsafe_tests/sql/alter_system_table.sql
+++ b/src/test/modules/unsafe_tests/sql/alter_system_table.sql
@@ -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();