mirror of
https://github.com/postgres/postgres.git
synced 2025-12-16 16:42:29 +03:00
Fix completely broken REINDEX SCHEMA testcase.
Aside from not testing the case it claimed to test (namely a permissions failure), it left a login-capable role lying around, which quite aside from possibly being a security hole would cause subsequent regression runs to fail since the role would already exist.
This commit is contained in:
@@ -979,11 +979,11 @@ REINDEX SCHEMA schema_to_reindex; -- failure, cannot run in a transaction
|
||||
END;
|
||||
|
||||
-- Failure for unauthorized user
|
||||
CREATE ROLE reindexuser login;
|
||||
SET SESSION ROLE user_reindex;
|
||||
CREATE ROLE regression_reindexuser NOLOGIN;
|
||||
SET SESSION ROLE regression_reindexuser;
|
||||
REINDEX SCHEMA schema_to_reindex;
|
||||
|
||||
-- Clean up
|
||||
RESET ROLE;
|
||||
DROP ROLE user_reindex;
|
||||
DROP ROLE regression_reindexuser;
|
||||
DROP SCHEMA schema_to_reindex CASCADE;
|
||||
|
||||
Reference in New Issue
Block a user