Skip to content

Commit 266e771

Browse files
committed
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.
1 parent a04bb65 commit 266e771

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/test/regress/expected/alter_operator.out

+4-5
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ ERROR: operator attribute "negator" can not be changed
6666
-- Test permission check. Must be owner to ALTER OPERATOR.
6767
--
6868
CREATE USER regtest_alter_user;
69-
SET SESSION AUTHORIZATION regtest_alter_user_user;
70-
ERROR: role "regtest_alter_user_user" does not exist
69+
SET SESSION AUTHORIZATION regtest_alter_user;
7170
ALTER OPERATOR === (boolean, boolean) SET (RESTRICT = NONE);
72-
RESET SESSION AUTHORIZATION;
71+
ERROR: must be owner of operator ===
7372
-- Clean up
74-
DROP USER regression_alter_user;
75-
ERROR: role "regression_alter_user" does not exist
73+
RESET SESSION AUTHORIZATION;
74+
DROP USER regtest_alter_user;
7675
DROP OPERATOR === (boolean, boolean);

src/test/regress/sql/alter_operator.sql

+3-5
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,15 @@ ALTER OPERATOR === (boolean, boolean) SET (JOIN = non_existent_func);
4848
ALTER OPERATOR === (boolean, boolean) SET (COMMUTATOR = !==);
4949
ALTER OPERATOR === (boolean, boolean) SET (NEGATOR = !==);
5050

51-
5251
--
5352
-- Test permission check. Must be owner to ALTER OPERATOR.
5453
--
5554
CREATE USER regtest_alter_user;
56-
SET SESSION AUTHORIZATION regtest_alter_user_user;
55+
SET SESSION AUTHORIZATION regtest_alter_user;
5756

5857
ALTER OPERATOR === (boolean, boolean) SET (RESTRICT = NONE);
5958

60-
RESET SESSION AUTHORIZATION;
61-
6259
-- Clean up
63-
DROP USER regression_alter_user;
60+
RESET SESSION AUTHORIZATION;
61+
DROP USER regtest_alter_user;
6462
DROP OPERATOR === (boolean, boolean);

0 commit comments

Comments
 (0)