Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Rename the role in stats_ext to have regress_ prefix
authorTomas Vondra <tomas.vondra@postgresql.org>
Tue, 31 Aug 2021 17:21:29 +0000 (19:21 +0200)
committerTomas Vondra <tomas.vondra@postgresql.org>
Tue, 31 Aug 2021 17:31:10 +0000 (19:31 +0200)
Commit 5be8ce82e8 added a new role to the stats_ext regression suite,
but the role name did not start with regress_ causing failures when
running with ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS. Fixed by
renaming the role to start with the expected regress_ prefix.

Backpatch-through: 10, same as the new regression test
Discussion: https://postgr.es/m/1F238937-7CC2-4703-A1B1-6DC225B8978A%40enterprisedb.com

src/test/regress/expected/stats_ext.out
src/test/regress/sql/stats_ext.sql

index f3560b3e12e456f2383739f2996fd9412b450403..f452ea722a5cfb0fe7ee6c45ca94884e48784f6a 100644 (file)
@@ -68,8 +68,8 @@ DROP TABLE ext_stats_test;
 CREATE TABLE ab1 (a INTEGER, b INTEGER, c INTEGER);
 CREATE STATISTICS IF NOT EXISTS ab1_a_b_stats ON a, b FROM ab1;
 COMMENT ON STATISTICS ab1_a_b_stats IS 'new comment';
-CREATE ROLE temp_role;
-SET SESSION AUTHORIZATION temp_role;
+CREATE ROLE regress_stats_ext;
+SET SESSION AUTHORIZATION regress_stats_ext;
 COMMENT ON STATISTICS ab1_a_b_stats IS 'changed comment';
 ERROR:  must be owner of statistics object ab1_a_b_stats
 DROP STATISTICS ab1_a_b_stats;
@@ -77,7 +77,7 @@ ERROR:  must be owner of statistics object ab1_a_b_stats
 ALTER STATISTICS ab1_a_b_stats RENAME TO ab1_a_b_stats_new;
 ERROR:  must be owner of statistics object ab1_a_b_stats
 RESET SESSION AUTHORIZATION;
-DROP ROLE temp_role;
+DROP ROLE regress_stats_ext;
 CREATE STATISTICS IF NOT EXISTS ab1_a_b_stats ON a, b FROM ab1;
 NOTICE:  statistics object "ab1_a_b_stats" already exists, skipping
 DROP STATISTICS ab1_a_b_stats;
index 57396184c16a8164977cca016ad4f80bc32b24d5..555b9473bbe293635e1927a0bae8cb3197df944f 100644 (file)
@@ -49,13 +49,13 @@ DROP TABLE ext_stats_test;
 CREATE TABLE ab1 (a INTEGER, b INTEGER, c INTEGER);
 CREATE STATISTICS IF NOT EXISTS ab1_a_b_stats ON a, b FROM ab1;
 COMMENT ON STATISTICS ab1_a_b_stats IS 'new comment';
-CREATE ROLE temp_role;
-SET SESSION AUTHORIZATION temp_role;
+CREATE ROLE regress_stats_ext;
+SET SESSION AUTHORIZATION regress_stats_ext;
 COMMENT ON STATISTICS ab1_a_b_stats IS 'changed comment';
 DROP STATISTICS ab1_a_b_stats;
 ALTER STATISTICS ab1_a_b_stats RENAME TO ab1_a_b_stats_new;
 RESET SESSION AUTHORIZATION;
-DROP ROLE temp_role;
+DROP ROLE regress_stats_ext;
 
 CREATE STATISTICS IF NOT EXISTS ab1_a_b_stats ON a, b FROM ab1;
 DROP STATISTICS ab1_a_b_stats;