Skip to content

Commit 5f8dd5d

Browse files
committed
Rename the role in stats_ext to have regress_ prefix
Commit 5be8ce8 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
1 parent 6c8b986 commit 5f8dd5d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/test/regress/expected/stats_ext.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ DROP TABLE ext_stats_test;
5353
CREATE TABLE ab1 (a INTEGER, b INTEGER, c INTEGER);
5454
CREATE STATISTICS IF NOT EXISTS ab1_a_b_stats ON a, b FROM ab1;
5555
COMMENT ON STATISTICS ab1_a_b_stats IS 'new comment';
56-
CREATE ROLE temp_role;
57-
SET SESSION AUTHORIZATION temp_role;
56+
CREATE ROLE regress_stats_ext;
57+
SET SESSION AUTHORIZATION regress_stats_ext;
5858
COMMENT ON STATISTICS ab1_a_b_stats IS 'changed comment';
5959
ERROR: must be owner of statistics object ab1_a_b_stats
6060
DROP STATISTICS ab1_a_b_stats;
6161
ERROR: must be owner of statistics object ab1_a_b_stats
6262
ALTER STATISTICS ab1_a_b_stats RENAME TO ab1_a_b_stats_new;
6363
ERROR: must be owner of statistics object ab1_a_b_stats
6464
RESET SESSION AUTHORIZATION;
65-
DROP ROLE temp_role;
65+
DROP ROLE regress_stats_ext;
6666
CREATE STATISTICS IF NOT EXISTS ab1_a_b_stats ON a, b FROM ab1;
6767
NOTICE: statistics object "ab1_a_b_stats" already exists, skipping
6868
DROP STATISTICS ab1_a_b_stats;

src/test/regress/sql/stats_ext.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ DROP TABLE ext_stats_test;
4242
CREATE TABLE ab1 (a INTEGER, b INTEGER, c INTEGER);
4343
CREATE STATISTICS IF NOT EXISTS ab1_a_b_stats ON a, b FROM ab1;
4444
COMMENT ON STATISTICS ab1_a_b_stats IS 'new comment';
45-
CREATE ROLE temp_role;
46-
SET SESSION AUTHORIZATION temp_role;
45+
CREATE ROLE regress_stats_ext;
46+
SET SESSION AUTHORIZATION regress_stats_ext;
4747
COMMENT ON STATISTICS ab1_a_b_stats IS 'changed comment';
4848
DROP STATISTICS ab1_a_b_stats;
4949
ALTER STATISTICS ab1_a_b_stats RENAME TO ab1_a_b_stats_new;
5050
RESET SESSION AUTHORIZATION;
51-
DROP ROLE temp_role;
51+
DROP ROLE regress_stats_ext;
5252

5353
CREATE STATISTICS IF NOT EXISTS ab1_a_b_stats ON a, b FROM ab1;
5454
DROP STATISTICS ab1_a_b_stats;

0 commit comments

Comments
 (0)