@@ -94,8 +94,8 @@ sub psql_command
94
94
95
95
# Create temporary roles and log table
96
96
psql_command(
97
- $node , ' CREATE ROLE alice WITH LOGIN;
98
- CREATE ROLE mallory WITH LOGIN;
97
+ $node , ' CREATE ROLE regress_alice WITH LOGIN;
98
+ CREATE ROLE regress_mallory WITH LOGIN;
99
99
CREATE TABLE user_logins(id serial, who text);
100
100
GRANT SELECT ON user_logins TO public;
101
101
' , 0, ' create tmp objects' ,
@@ -109,7 +109,7 @@ sub psql_command
109
109
' CREATE FUNCTION on_login_proc() RETURNS event_trigger AS $$
110
110
BEGIN
111
111
INSERT INTO user_logins (who) VALUES (SESSION_USER);
112
- IF SESSION_USER = \' mallory \' THEN
112
+ IF SESSION_USER = \' regress_mallory \' THEN
113
113
RAISE EXCEPTION \' Hello %! You are NOT welcome here!\' , SESSION_USER;
114
114
END IF;
115
115
RAISE NOTICE \' Hello %! You are welcome!\' , SESSION_USER;
@@ -140,29 +140,29 @@ BEGIN
140
140
141
141
# Try to log as allowed Alice and disallowed Mallory (two times)
142
142
psql_command(
143
- $node , ' SELECT 1;' , 0, ' try alice ' ,
144
- connstr => ' user=alice ' ,
143
+ $node , ' SELECT 1;' , 0, ' try regress_alice ' ,
144
+ connstr => ' user=regress_alice ' ,
145
145
log_exact => ' 1' ,
146
146
err_like => [qr / You are welcome/ ],
147
147
err_unlike => [qr / You are NOT welcome/ ]);
148
148
psql_command(
149
- $node , ' SELECT 1;' , 2, ' try mallory ' ,
150
- connstr => ' user=mallory ' ,
149
+ $node , ' SELECT 1;' , 2, ' try regress_mallory ' ,
150
+ connstr => ' user=regress_mallory ' ,
151
151
log_exact => ' ' ,
152
152
err_like => [qr / You are NOT welcome/ ],
153
153
err_unlike => [qr / You are welcome/ ]);
154
154
psql_command(
155
- $node , ' SELECT 1;' , 2, ' try mallory ' ,
156
- connstr => ' user=mallory ' ,
155
+ $node , ' SELECT 1;' , 2, ' try regress_mallory ' ,
156
+ connstr => ' user=regress_mallory ' ,
157
157
log_exact => ' ' ,
158
158
err_like => [qr / You are NOT welcome/ ],
159
159
err_unlike => [qr / You are welcome/ ]);
160
160
161
161
# Check that Alice's login record is here, while the Mallory's one is not
162
162
psql_command(
163
163
$node , ' SELECT * FROM user_logins;' , 0, ' select *' ,
164
- log_like => [qr / 3\| alice / ],
165
- log_unlike => [qr /mallory / ],
164
+ log_like => [qr / 3\| regress_alice / ],
165
+ log_unlike => [qr /regress_mallory / ],
166
166
err_like => [qr / You are welcome/ ]);
167
167
168
168
# Check total number of successful logins so far
@@ -180,8 +180,8 @@ BEGIN
180
180
psql_command(
181
181
$node , ' DROP TABLE user_logins;
182
182
DROP FUNCTION on_login_proc;
183
- DROP ROLE mallory ;
184
- DROP ROLE alice ;
183
+ DROP ROLE regress_mallory ;
184
+ DROP ROLE regress_alice ;
185
185
' , 0, ' cleanup' ,
186
186
log_exact => ' ' ,
187
187
err_exact => ' ' );
0 commit comments