Commit 266e7714 authored by Tom Lane's avatar Tom Lane

Fix entirely broken permissions test in new alter_operator regression test.

Not only did this test fail to test what it was supposed to test, but it
left a user definition lying around, which caused subsequent runs of the
regression tests to fail.
parent a04bb65f
...@@ -66,11 +66,10 @@ ERROR: operator attribute "negator" can not be changed ...@@ -66,11 +66,10 @@ ERROR: operator attribute "negator" can not be changed
-- Test permission check. Must be owner to ALTER OPERATOR. -- Test permission check. Must be owner to ALTER OPERATOR.
-- --
CREATE USER regtest_alter_user; CREATE USER regtest_alter_user;
SET SESSION AUTHORIZATION regtest_alter_user_user; SET SESSION AUTHORIZATION regtest_alter_user;
ERROR: role "regtest_alter_user_user" does not exist
ALTER OPERATOR === (boolean, boolean) SET (RESTRICT = NONE); ALTER OPERATOR === (boolean, boolean) SET (RESTRICT = NONE);
RESET SESSION AUTHORIZATION; ERROR: must be owner of operator ===
-- Clean up -- Clean up
DROP USER regression_alter_user; RESET SESSION AUTHORIZATION;
ERROR: role "regression_alter_user" does not exist DROP USER regtest_alter_user;
DROP OPERATOR === (boolean, boolean); DROP OPERATOR === (boolean, boolean);
...@@ -48,17 +48,15 @@ ALTER OPERATOR === (boolean, boolean) SET (JOIN = non_existent_func); ...@@ -48,17 +48,15 @@ ALTER OPERATOR === (boolean, boolean) SET (JOIN = non_existent_func);
ALTER OPERATOR === (boolean, boolean) SET (COMMUTATOR = !==); ALTER OPERATOR === (boolean, boolean) SET (COMMUTATOR = !==);
ALTER OPERATOR === (boolean, boolean) SET (NEGATOR = !==); ALTER OPERATOR === (boolean, boolean) SET (NEGATOR = !==);
-- --
-- Test permission check. Must be owner to ALTER OPERATOR. -- Test permission check. Must be owner to ALTER OPERATOR.
-- --
CREATE USER regtest_alter_user; CREATE USER regtest_alter_user;
SET SESSION AUTHORIZATION regtest_alter_user_user; SET SESSION AUTHORIZATION regtest_alter_user;
ALTER OPERATOR === (boolean, boolean) SET (RESTRICT = NONE); ALTER OPERATOR === (boolean, boolean) SET (RESTRICT = NONE);
RESET SESSION AUTHORIZATION;
-- Clean up -- Clean up
DROP USER regression_alter_user; RESET SESSION AUTHORIZATION;
DROP USER regtest_alter_user;
DROP OPERATOR === (boolean, boolean); DROP OPERATOR === (boolean, boolean);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment