@@ -11,26 +11,26 @@ LOAD 'test_oat_hooks';
1111SET test_oat_hooks.audit = true;
1212NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.audit]
1313NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.audit]
14- NOTICE: in process utility: superuser finished set
14+ NOTICE: in process utility: superuser finished SET
1515-- Creating privileges on an existent custom GUC should create precisely the
1616-- right privileges, not overly conservative ones.
1717GRANT SET ON PARAMETER test_oat_hooks.user_var2 TO regress_role_joe;
18- NOTICE: in process utility: superuser attempting GrantStmt
19- NOTICE: in process utility: superuser finished GrantStmt
18+ NOTICE: in process utility: superuser attempting GRANT
19+ NOTICE: in process utility: superuser finished GRANT
2020GRANT SET ON PARAMETER test_oat_hooks.super_var2 TO regress_role_joe;
21- NOTICE: in process utility: superuser attempting GrantStmt
22- NOTICE: in process utility: superuser finished GrantStmt
21+ NOTICE: in process utility: superuser attempting GRANT
22+ NOTICE: in process utility: superuser finished GRANT
2323-- Granting multiple privileges on a parameter should be reported correctly to
2424-- the OAT hook, but beware that WITH GRANT OPTION is not represented.
2525GRANT SET, ALTER SYSTEM ON PARAMETER none.such TO regress_role_joe;
26- NOTICE: in process utility: superuser attempting GrantStmt
27- NOTICE: in process utility: superuser finished GrantStmt
26+ NOTICE: in process utility: superuser attempting GRANT
27+ NOTICE: in process utility: superuser finished GRANT
2828GRANT SET, ALTER SYSTEM ON PARAMETER another.bogus TO regress_role_joe WITH GRANT OPTION;
29- NOTICE: in process utility: superuser attempting GrantStmt
30- NOTICE: in process utility: superuser finished GrantStmt
29+ NOTICE: in process utility: superuser attempting GRANT
30+ NOTICE: in process utility: superuser finished GRANT
3131-- Check when the hooks fire relative to dependency based abort of a drop
3232DROP ROLE regress_role_joe;
33- NOTICE: in process utility: superuser attempting DropRoleStmt
33+ NOTICE: in process utility: superuser attempting DROP ROLE
3434NOTICE: in object access: superuser attempting drop (subId=0x0) []
3535NOTICE: in object access: superuser finished drop (subId=0x0) []
3636ERROR: role "regress_role_joe" cannot be dropped because some objects depend on it
@@ -42,30 +42,30 @@ privileges for parameter none.such
4242privileges for parameter another.bogus
4343-- Check the behavior of the hooks relative to do-nothing grants and revokes
4444GRANT SET ON PARAMETER maintenance_work_mem TO PUBLIC;
45- NOTICE: in process utility: superuser attempting GrantStmt
46- NOTICE: in process utility: superuser finished GrantStmt
45+ NOTICE: in process utility: superuser attempting GRANT
46+ NOTICE: in process utility: superuser finished GRANT
4747REVOKE SET ON PARAMETER maintenance_work_mem FROM PUBLIC;
48- NOTICE: in process utility: superuser attempting GrantStmt
49- NOTICE: in process utility: superuser finished GrantStmt
48+ NOTICE: in process utility: superuser attempting REVOKE
49+ NOTICE: in process utility: superuser finished REVOKE
5050REVOKE ALTER SYSTEM ON PARAMETER maintenance_work_mem FROM PUBLIC;
51- NOTICE: in process utility: superuser attempting GrantStmt
52- NOTICE: in process utility: superuser finished GrantStmt
51+ NOTICE: in process utility: superuser attempting REVOKE
52+ NOTICE: in process utility: superuser finished REVOKE
5353-- Check the behavior of the hooks relative to unrecognized parameters
5454GRANT ALL ON PARAMETER "none.such" TO PUBLIC;
55- NOTICE: in process utility: superuser attempting GrantStmt
56- NOTICE: in process utility: superuser finished GrantStmt
55+ NOTICE: in process utility: superuser attempting GRANT
56+ NOTICE: in process utility: superuser finished GRANT
5757-- Check relative to an operation that causes the catalog entry to be deleted
5858REVOKE ALL ON PARAMETER "none.such" FROM PUBLIC;
59- NOTICE: in process utility: superuser attempting GrantStmt
60- NOTICE: in process utility: superuser finished GrantStmt
59+ NOTICE: in process utility: superuser attempting REVOKE
60+ NOTICE: in process utility: superuser finished REVOKE
6161-- Create objects for use in the test
6262CREATE USER regress_test_user;
63- NOTICE: in process utility: superuser attempting CreateRoleStmt
63+ NOTICE: in process utility: superuser attempting CREATE ROLE
6464NOTICE: in object access: superuser attempting create (subId=0x0) [explicit]
6565NOTICE: in object access: superuser finished create (subId=0x0) [explicit]
66- NOTICE: in process utility: superuser finished CreateRoleStmt
66+ NOTICE: in process utility: superuser finished CREATE ROLE
6767CREATE TABLE regress_test_table (t text);
68- NOTICE: in process utility: superuser attempting CreateStmt
68+ NOTICE: in process utility: superuser attempting CREATE TABLE
6969NOTICE: in object access: superuser attempting namespace search (subId=0x0) [no report on violation, allowed]
7070LINE 1: CREATE TABLE regress_test_table (t text);
7171 ^
@@ -82,25 +82,25 @@ NOTICE: in object access: superuser attempting create (subId=0x0) [internal]
8282NOTICE: in object access: superuser finished create (subId=0x0) [internal]
8383NOTICE: in object access: superuser attempting create (subId=0x0) [internal]
8484NOTICE: in object access: superuser finished create (subId=0x0) [internal]
85- NOTICE: in process utility: superuser finished CreateStmt
85+ NOTICE: in process utility: superuser finished CREATE TABLE
8686CREATE INDEX regress_test_table_t_idx ON regress_test_table (t);
87- NOTICE: in process utility: superuser attempting IndexStmt
87+ NOTICE: in process utility: superuser attempting CREATE INDEX
8888NOTICE: in object access: superuser attempting create (subId=0x0) [explicit]
8989NOTICE: in object access: superuser finished create (subId=0x0) [explicit]
90- NOTICE: in process utility: superuser finished IndexStmt
90+ NOTICE: in process utility: superuser finished CREATE INDEX
9191GRANT SELECT ON Table regress_test_table TO public;
92- NOTICE: in process utility: superuser attempting GrantStmt
93- NOTICE: in process utility: superuser finished GrantStmt
92+ NOTICE: in process utility: superuser attempting GRANT
93+ NOTICE: in process utility: superuser finished GRANT
9494CREATE FUNCTION regress_test_func (t text) RETURNS text AS $$
9595 SELECT $1;
9696$$ LANGUAGE sql;
97- NOTICE: in process utility: superuser attempting CreateFunctionStmt
97+ NOTICE: in process utility: superuser attempting CREATE FUNCTION
9898NOTICE: in object access: superuser attempting create (subId=0x0) [explicit]
9999NOTICE: in object access: superuser finished create (subId=0x0) [explicit]
100- NOTICE: in process utility: superuser finished CreateFunctionStmt
100+ NOTICE: in process utility: superuser finished CREATE FUNCTION
101101GRANT EXECUTE ON FUNCTION regress_test_func (text) TO public;
102- NOTICE: in process utility: superuser attempting GrantStmt
103- NOTICE: in process utility: superuser finished GrantStmt
102+ NOTICE: in process utility: superuser attempting GRANT
103+ NOTICE: in process utility: superuser finished GRANT
104104-- Do a few things as superuser
105105SELECT * FROM regress_test_table;
106106NOTICE: in executor check perms: superuser attempting execute
@@ -118,31 +118,31 @@ NOTICE: in executor check perms: superuser finished execute
118118(1 row)
119119
120120SET work_mem = 8192;
121- NOTICE: in process utility: superuser attempting set
121+ NOTICE: in process utility: superuser attempting SET
122122NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [work_mem]
123123NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [work_mem]
124- NOTICE: in process utility: superuser finished set
124+ NOTICE: in process utility: superuser finished SET
125125RESET work_mem;
126- NOTICE: in process utility: superuser attempting set
126+ NOTICE: in process utility: superuser attempting RESET
127127NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [work_mem]
128128NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [work_mem]
129- NOTICE: in process utility: superuser finished set
129+ NOTICE: in process utility: superuser finished RESET
130130ALTER SYSTEM SET work_mem = 8192;
131- NOTICE: in process utility: superuser attempting alter system
131+ NOTICE: in process utility: superuser attempting ALTER SYSTEM
132132NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
133133NOTICE: in object_access_hook_str: superuser finished alter (subId=0x2000, alter system) [work_mem]
134- NOTICE: in process utility: superuser finished alter system
134+ NOTICE: in process utility: superuser finished ALTER SYSTEM
135135ALTER SYSTEM RESET work_mem;
136- NOTICE: in process utility: superuser attempting alter system
136+ NOTICE: in process utility: superuser attempting ALTER SYSTEM
137137NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
138138NOTICE: in object_access_hook_str: superuser finished alter (subId=0x2000, alter system) [work_mem]
139- NOTICE: in process utility: superuser finished alter system
139+ NOTICE: in process utility: superuser finished ALTER SYSTEM
140140-- Do those same things as non-superuser
141141SET SESSION AUTHORIZATION regress_test_user;
142- NOTICE: in process utility: superuser attempting set
142+ NOTICE: in process utility: superuser attempting SET
143143NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [session_authorization]
144144NOTICE: in object_access_hook_str: non-superuser finished alter (subId=0x1000, set) [session_authorization]
145- NOTICE: in process utility: non-superuser finished set
145+ NOTICE: in process utility: non-superuser finished SET
146146SELECT * FROM regress_test_table;
147147NOTICE: in object access: non-superuser attempting namespace search (subId=0x0) [no report on violation, allowed]
148148LINE 1: SELECT * FROM regress_test_table;
@@ -165,83 +165,83 @@ NOTICE: in executor check perms: non-superuser finished execute
165165(1 row)
166166
167167SET work_mem = 8192;
168- NOTICE: in process utility: non-superuser attempting set
168+ NOTICE: in process utility: non-superuser attempting SET
169169NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [work_mem]
170170NOTICE: in object_access_hook_str: non-superuser finished alter (subId=0x1000, set) [work_mem]
171- NOTICE: in process utility: non-superuser finished set
171+ NOTICE: in process utility: non-superuser finished SET
172172RESET work_mem;
173- NOTICE: in process utility: non-superuser attempting set
173+ NOTICE: in process utility: non-superuser attempting RESET
174174NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [work_mem]
175175NOTICE: in object_access_hook_str: non-superuser finished alter (subId=0x1000, set) [work_mem]
176- NOTICE: in process utility: non-superuser finished set
176+ NOTICE: in process utility: non-superuser finished RESET
177177ALTER SYSTEM SET work_mem = 8192;
178- NOTICE: in process utility: non-superuser attempting alter system
178+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
179179ERROR: permission denied to set parameter "work_mem"
180180ALTER SYSTEM RESET work_mem;
181- NOTICE: in process utility: non-superuser attempting alter system
181+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
182182ERROR: permission denied to set parameter "work_mem"
183183SET test_oat_hooks.user_var1 = true;
184- NOTICE: in process utility: non-superuser attempting set
184+ NOTICE: in process utility: non-superuser attempting SET
185185NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [test_oat_hooks.user_var1]
186186NOTICE: in object_access_hook_str: non-superuser finished alter (subId=0x1000, set) [test_oat_hooks.user_var1]
187- NOTICE: in process utility: non-superuser finished set
187+ NOTICE: in process utility: non-superuser finished SET
188188SET test_oat_hooks.super_var1 = true;
189- NOTICE: in process utility: non-superuser attempting set
189+ NOTICE: in process utility: non-superuser attempting SET
190190ERROR: permission denied to set parameter "test_oat_hooks.super_var1"
191191ALTER SYSTEM SET test_oat_hooks.user_var1 = true;
192- NOTICE: in process utility: non-superuser attempting alter system
192+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
193193ERROR: permission denied to set parameter "test_oat_hooks.user_var1"
194194ALTER SYSTEM SET test_oat_hooks.super_var1 = true;
195- NOTICE: in process utility: non-superuser attempting alter system
195+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
196196ERROR: permission denied to set parameter "test_oat_hooks.super_var1"
197197SET test_oat_hooks.user_var2 = true;
198- NOTICE: in process utility: non-superuser attempting set
198+ NOTICE: in process utility: non-superuser attempting SET
199199NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [test_oat_hooks.user_var2]
200200NOTICE: in object_access_hook_str: non-superuser finished alter (subId=0x1000, set) [test_oat_hooks.user_var2]
201- NOTICE: in process utility: non-superuser finished set
201+ NOTICE: in process utility: non-superuser finished SET
202202SET test_oat_hooks.super_var2 = true;
203- NOTICE: in process utility: non-superuser attempting set
203+ NOTICE: in process utility: non-superuser attempting SET
204204ERROR: permission denied to set parameter "test_oat_hooks.super_var2"
205205ALTER SYSTEM SET test_oat_hooks.user_var2 = true;
206- NOTICE: in process utility: non-superuser attempting alter system
206+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
207207ERROR: permission denied to set parameter "test_oat_hooks.user_var2"
208208ALTER SYSTEM SET test_oat_hooks.super_var2 = true;
209- NOTICE: in process utility: non-superuser attempting alter system
209+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
210210ERROR: permission denied to set parameter "test_oat_hooks.super_var2"
211211RESET SESSION AUTHORIZATION;
212- NOTICE: in process utility: non-superuser attempting set
212+ NOTICE: in process utility: non-superuser attempting RESET
213213NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [session_authorization]
214214NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [session_authorization]
215- NOTICE: in process utility: superuser finished set
215+ NOTICE: in process utility: superuser finished RESET
216216-- Turn off non-superuser permissions
217217SET test_oat_hooks.deny_set_variable = true;
218- NOTICE: in process utility: superuser attempting set
218+ NOTICE: in process utility: superuser attempting SET
219219NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_set_variable]
220220NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.deny_set_variable]
221- NOTICE: in process utility: superuser finished set
221+ NOTICE: in process utility: superuser finished SET
222222SET test_oat_hooks.deny_alter_system = true;
223- NOTICE: in process utility: superuser attempting set
223+ NOTICE: in process utility: superuser attempting SET
224224NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_alter_system]
225225NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.deny_alter_system]
226- NOTICE: in process utility: superuser finished set
226+ NOTICE: in process utility: superuser finished SET
227227SET test_oat_hooks.deny_object_access = true;
228- NOTICE: in process utility: superuser attempting set
228+ NOTICE: in process utility: superuser attempting SET
229229NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_object_access]
230230NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.deny_object_access]
231- NOTICE: in process utility: superuser finished set
231+ NOTICE: in process utility: superuser finished SET
232232SET test_oat_hooks.deny_exec_perms = true;
233- NOTICE: in process utility: superuser attempting set
233+ NOTICE: in process utility: superuser attempting SET
234234NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_exec_perms]
235235NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.deny_exec_perms]
236- NOTICE: in process utility: superuser finished set
236+ NOTICE: in process utility: superuser finished SET
237237SET test_oat_hooks.deny_utility_commands = true;
238- NOTICE: in process utility: superuser attempting set
238+ NOTICE: in process utility: superuser attempting SET
239239NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_utility_commands]
240240NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.deny_utility_commands]
241- NOTICE: in process utility: superuser finished set
241+ NOTICE: in process utility: superuser finished SET
242242-- Try again as non-superuser with permissions denied
243243SET SESSION AUTHORIZATION regress_test_user;
244- NOTICE: in process utility: superuser attempting set
244+ NOTICE: in process utility: superuser attempting SET
245245NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [session_authorization]
246246ERROR: permission denied: set session_authorization
247247SELECT * FROM regress_test_table;
@@ -266,39 +266,39 @@ NOTICE: in executor check perms: superuser finished execute
266266(1 row)
267267
268268SET work_mem = 8192;
269- NOTICE: in process utility: superuser attempting set
269+ NOTICE: in process utility: superuser attempting SET
270270NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [work_mem]
271271NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [work_mem]
272- NOTICE: in process utility: superuser finished set
272+ NOTICE: in process utility: superuser finished SET
273273RESET work_mem;
274- NOTICE: in process utility: superuser attempting set
274+ NOTICE: in process utility: superuser attempting RESET
275275NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [work_mem]
276276NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [work_mem]
277- NOTICE: in process utility: superuser finished set
277+ NOTICE: in process utility: superuser finished RESET
278278ALTER SYSTEM SET work_mem = 8192;
279- NOTICE: in process utility: superuser attempting alter system
279+ NOTICE: in process utility: superuser attempting ALTER SYSTEM
280280NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
281281NOTICE: in object_access_hook_str: superuser finished alter (subId=0x2000, alter system) [work_mem]
282- NOTICE: in process utility: superuser finished alter system
282+ NOTICE: in process utility: superuser finished ALTER SYSTEM
283283ALTER SYSTEM RESET work_mem;
284- NOTICE: in process utility: superuser attempting alter system
284+ NOTICE: in process utility: superuser attempting ALTER SYSTEM
285285NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
286286NOTICE: in object_access_hook_str: superuser finished alter (subId=0x2000, alter system) [work_mem]
287- NOTICE: in process utility: superuser finished alter system
287+ NOTICE: in process utility: superuser finished ALTER SYSTEM
288288-- try labelled drops
289289RESET SESSION AUTHORIZATION;
290- NOTICE: in process utility: superuser attempting set
290+ NOTICE: in process utility: superuser attempting RESET
291291NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [session_authorization]
292292NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [session_authorization]
293- NOTICE: in process utility: superuser finished set
293+ NOTICE: in process utility: superuser finished RESET
294294DROP INDEX CONCURRENTLY regress_test_table_t_idx;
295- NOTICE: in process utility: superuser attempting DropStmt
295+ NOTICE: in process utility: superuser attempting DROP INDEX
296296NOTICE: in object access: superuser attempting drop (subId=0x0) [concurrent drop,]
297297NOTICE: in object access: superuser finished drop (subId=0x0) [concurrent drop,]
298- NOTICE: in process utility: superuser finished DropStmt
298+ NOTICE: in process utility: superuser finished DROP INDEX
299299-- Clean up
300300SET test_oat_hooks.audit = false;
301- NOTICE: in process utility: superuser attempting set
301+ NOTICE: in process utility: superuser attempting SET
302302DROP ROLE regress_role_joe; -- fails
303303ERROR: role "regress_role_joe" cannot be dropped because some objects depend on it
304304DETAIL: privileges for parameter test_oat_hooks.user_var1
0 commit comments