Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit48412f1

Browse files
tglsfdcpull[bot]
authored andcommitted
Don't leave roles behind after core regression tests.
Commitscf5eb37 ande5b8a4c each created a new role that theyforgot to remove again. This breaks the use-case of running "makeinstallcheck" more than once, and it's also against project policybecause it'd be quite unfriendly behavior if one were running"make installcheck" against a non-throwaway installation.
1 parent86c0d29 commit48412f1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

‎src/test/regress/expected/create_role.out

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,23 @@ DROP ROLE regress_password_null;
174174
DROP ROLE regress_noiseword;
175175
DROP ROLE regress_inroles;
176176
DROP ROLE regress_adminroles;
177-
-- fail, cannot drop ourself nor superusers
177+
-- fail, cannot drop ourself, nor superusers or roles we lack ADMIN for
178178
DROP ROLE regress_role_super;
179179
ERROR: must be superuser to drop superusers
180180
DROP ROLE regress_role_admin;
181181
ERROR: current user cannot be dropped
182+
DROP ROLE regress_rolecreator;
183+
ERROR: must have admin option on role "regress_rolecreator"
182184
-- ok
183185
RESET SESSION AUTHORIZATION;
184186
REVOKE CREATE ON DATABASE regression FROM regress_role_admin CASCADE;
185187
DROP INDEX tenant_idx;
186188
DROP TABLE tenant_table;
187189
DROP VIEW tenant_view;
190+
DROP SCHEMA regress_tenant2_schema;
188191
DROP ROLE regress_tenant;
192+
DROP ROLE regress_tenant2;
193+
DROP ROLE regress_rolecreator;
189194
DROP ROLE regress_role_admin;
190195
DROP ROLE regress_role_super;
191196
DROP ROLE regress_role_normal;

‎src/test/regress/sql/create_role.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,21 @@ DROP ROLE regress_noiseword;
161161
DROP ROLE regress_inroles;
162162
DROP ROLE regress_adminroles;
163163

164-
-- fail, cannot drop ourself nor superusers
164+
-- fail, cannot drop ourself, nor superusers or roles we lack ADMIN for
165165
DROP ROLE regress_role_super;
166166
DROP ROLE regress_role_admin;
167+
DROP ROLE regress_rolecreator;
167168

168169
-- ok
169170
RESET SESSION AUTHORIZATION;
170171
REVOKE CREATEON DATABASE regressionFROM regress_role_admin CASCADE;
171172
DROPINDEX tenant_idx;
172173
DROPTABLE tenant_table;
173174
DROPVIEW tenant_view;
175+
DROPSCHEMA regress_tenant2_schema;
174176
DROP ROLE regress_tenant;
177+
DROP ROLE regress_tenant2;
178+
DROP ROLE regress_rolecreator;
175179
DROP ROLE regress_role_admin;
176180
DROP ROLE regress_role_super;
177181
DROP ROLE regress_role_normal;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp