@@ -94,8 +94,8 @@ sub psql_command
9494
9595# Create temporary roles and log table
9696psql_command(
97- $node ,' CREATE ROLEalice WITH LOGIN;
98- CREATE ROLEmallory WITH LOGIN;
97+ $node ,' CREATE ROLEregress_alice WITH LOGIN;
98+ CREATE ROLEregress_mallory WITH LOGIN;
9999CREATE TABLE user_logins(id serial, who text);
100100GRANT SELECT ON user_logins TO public;
101101' , 0,' create tmp objects' ,
@@ -109,7 +109,7 @@ sub psql_command
109109' CREATE FUNCTION on_login_proc() RETURNS event_trigger AS $$
110110BEGIN
111111 INSERT INTO user_logins (who) VALUES (SESSION_USER);
112- IF SESSION_USER =\' mallory \' THEN
112+ IF SESSION_USER =\' regress_mallory \' THEN
113113 RAISE EXCEPTION\' Hello %! You are NOT welcome here!\' , SESSION_USER;
114114 END IF;
115115 RAISE NOTICE\' Hello %! You are welcome!\' , SESSION_USER;
@@ -140,29 +140,29 @@ BEGIN
140140
141141# Try to log as allowed Alice and disallowed Mallory (two times)
142142psql_command(
143- $node ,' SELECT 1;' , 0,' tryalice ' ,
144- connstr => ' user=alice ' ,
143+ $node ,' SELECT 1;' , 0,' tryregress_alice ' ,
144+ connstr => ' user=regress_alice ' ,
145145log_exact => ' 1' ,
146146err_like => [qr / You are welcome/ ],
147147err_unlike => [qr / You are NOT welcome/ ]);
148148psql_command(
149- $node ,' SELECT 1;' , 2,' trymallory ' ,
150- connstr => ' user=mallory ' ,
149+ $node ,' SELECT 1;' , 2,' tryregress_mallory ' ,
150+ connstr => ' user=regress_mallory ' ,
151151log_exact => ' ' ,
152152err_like => [qr / You are NOT welcome/ ],
153153err_unlike => [qr / You are welcome/ ]);
154154psql_command(
155- $node ,' SELECT 1;' , 2,' trymallory ' ,
156- connstr => ' user=mallory ' ,
155+ $node ,' SELECT 1;' , 2,' tryregress_mallory ' ,
156+ connstr => ' user=regress_mallory ' ,
157157log_exact => ' ' ,
158158err_like => [qr / You are NOT welcome/ ],
159159err_unlike => [qr / You are welcome/ ]);
160160
161161# Check that Alice's login record is here, while the Mallory's one is not
162162psql_command(
163163$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 / ],
166166err_like => [qr / You are welcome/ ]);
167167
168168# Check total number of successful logins so far
@@ -180,8 +180,8 @@ BEGIN
180180psql_command(
181181$node ,' DROP TABLE user_logins;
182182DROP FUNCTION on_login_proc;
183- DROP ROLEmallory ;
184- DROP ROLEalice ;
183+ DROP ROLEregress_mallory ;
184+ DROP ROLEregress_alice ;
185185' , 0,' cleanup' ,
186186log_exact => ' ' ,
187187err_exact => ' ' );