@@ -11,26 +11,26 @@ LOAD 'test_oat_hooks';
11
11
SET test_oat_hooks.audit = true;
12
12
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.audit]
13
13
NOTICE: 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
15
15
-- Creating privileges on an existent custom GUC should create precisely the
16
16
-- right privileges, not overly conservative ones.
17
17
GRANT 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
20
20
GRANT 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
23
23
-- Granting multiple privileges on a parameter should be reported correctly to
24
24
-- the OAT hook, but beware that WITH GRANT OPTION is not represented.
25
25
GRANT 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
28
28
GRANT 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
31
31
-- Check when the hooks fire relative to dependency based abort of a drop
32
32
DROP ROLE regress_role_joe;
33
- NOTICE: in process utility: superuser attempting DropRoleStmt
33
+ NOTICE: in process utility: superuser attempting DROP ROLE
34
34
NOTICE: in object access: superuser attempting drop (subId=0x0) []
35
35
NOTICE: in object access: superuser finished drop (subId=0x0) []
36
36
ERROR: role "regress_role_joe" cannot be dropped because some objects depend on it
@@ -42,30 +42,30 @@ privileges for parameter none.such
42
42
privileges for parameter another.bogus
43
43
-- Check the behavior of the hooks relative to do-nothing grants and revokes
44
44
GRANT 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
47
47
REVOKE 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
50
50
REVOKE 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
53
53
-- Check the behavior of the hooks relative to unrecognized parameters
54
54
GRANT 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
57
57
-- Check relative to an operation that causes the catalog entry to be deleted
58
58
REVOKE 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
61
61
-- Create objects for use in the test
62
62
CREATE USER regress_test_user;
63
- NOTICE: in process utility: superuser attempting CreateRoleStmt
63
+ NOTICE: in process utility: superuser attempting CREATE ROLE
64
64
NOTICE: in object access: superuser attempting create (subId=0x0) [explicit]
65
65
NOTICE: 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
67
67
CREATE TABLE regress_test_table (t text);
68
- NOTICE: in process utility: superuser attempting CreateStmt
68
+ NOTICE: in process utility: superuser attempting CREATE TABLE
69
69
NOTICE: in object access: superuser attempting namespace search (subId=0x0) [no report on violation, allowed]
70
70
LINE 1: CREATE TABLE regress_test_table (t text);
71
71
^
@@ -82,25 +82,25 @@ NOTICE: in object access: superuser attempting create (subId=0x0) [internal]
82
82
NOTICE: in object access: superuser finished create (subId=0x0) [internal]
83
83
NOTICE: in object access: superuser attempting create (subId=0x0) [internal]
84
84
NOTICE: 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
86
86
CREATE 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
88
88
NOTICE: in object access: superuser attempting create (subId=0x0) [explicit]
89
89
NOTICE: 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
91
91
GRANT 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
94
94
CREATE FUNCTION regress_test_func (t text) RETURNS text AS $$
95
95
SELECT $1;
96
96
$$ LANGUAGE sql;
97
- NOTICE: in process utility: superuser attempting CreateFunctionStmt
97
+ NOTICE: in process utility: superuser attempting CREATE FUNCTION
98
98
NOTICE: in object access: superuser attempting create (subId=0x0) [explicit]
99
99
NOTICE: 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
101
101
GRANT 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
104
104
-- Do a few things as superuser
105
105
SELECT * FROM regress_test_table;
106
106
NOTICE: in executor check perms: superuser attempting execute
@@ -118,31 +118,31 @@ NOTICE: in executor check perms: superuser finished execute
118
118
(1 row)
119
119
120
120
SET work_mem = 8192;
121
- NOTICE: in process utility: superuser attempting set
121
+ NOTICE: in process utility: superuser attempting SET
122
122
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [work_mem]
123
123
NOTICE: 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
125
125
RESET work_mem;
126
- NOTICE: in process utility: superuser attempting set
126
+ NOTICE: in process utility: superuser attempting RESET
127
127
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [work_mem]
128
128
NOTICE: 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
130
130
ALTER SYSTEM SET work_mem = 8192;
131
- NOTICE: in process utility: superuser attempting alter system
131
+ NOTICE: in process utility: superuser attempting ALTER SYSTEM
132
132
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
133
133
NOTICE: 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
135
135
ALTER SYSTEM RESET work_mem;
136
- NOTICE: in process utility: superuser attempting alter system
136
+ NOTICE: in process utility: superuser attempting ALTER SYSTEM
137
137
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
138
138
NOTICE: 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
140
140
-- Do those same things as non-superuser
141
141
SET SESSION AUTHORIZATION regress_test_user;
142
- NOTICE: in process utility: superuser attempting set
142
+ NOTICE: in process utility: superuser attempting SET
143
143
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [session_authorization]
144
144
NOTICE: 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
146
146
SELECT * FROM regress_test_table;
147
147
NOTICE: in object access: non-superuser attempting namespace search (subId=0x0) [no report on violation, allowed]
148
148
LINE 1: SELECT * FROM regress_test_table;
@@ -165,83 +165,83 @@ NOTICE: in executor check perms: non-superuser finished execute
165
165
(1 row)
166
166
167
167
SET work_mem = 8192;
168
- NOTICE: in process utility: non-superuser attempting set
168
+ NOTICE: in process utility: non-superuser attempting SET
169
169
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [work_mem]
170
170
NOTICE: 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
172
172
RESET work_mem;
173
- NOTICE: in process utility: non-superuser attempting set
173
+ NOTICE: in process utility: non-superuser attempting RESET
174
174
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [work_mem]
175
175
NOTICE: 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
177
177
ALTER 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
179
179
ERROR: permission denied to set parameter "work_mem"
180
180
ALTER SYSTEM RESET work_mem;
181
- NOTICE: in process utility: non-superuser attempting alter system
181
+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
182
182
ERROR: permission denied to set parameter "work_mem"
183
183
SET test_oat_hooks.user_var1 = true;
184
- NOTICE: in process utility: non-superuser attempting set
184
+ NOTICE: in process utility: non-superuser attempting SET
185
185
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [test_oat_hooks.user_var1]
186
186
NOTICE: 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
188
188
SET test_oat_hooks.super_var1 = true;
189
- NOTICE: in process utility: non-superuser attempting set
189
+ NOTICE: in process utility: non-superuser attempting SET
190
190
ERROR: permission denied to set parameter "test_oat_hooks.super_var1"
191
191
ALTER 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
193
193
ERROR: permission denied to set parameter "test_oat_hooks.user_var1"
194
194
ALTER 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
196
196
ERROR: permission denied to set parameter "test_oat_hooks.super_var1"
197
197
SET test_oat_hooks.user_var2 = true;
198
- NOTICE: in process utility: non-superuser attempting set
198
+ NOTICE: in process utility: non-superuser attempting SET
199
199
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [test_oat_hooks.user_var2]
200
200
NOTICE: 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
202
202
SET test_oat_hooks.super_var2 = true;
203
- NOTICE: in process utility: non-superuser attempting set
203
+ NOTICE: in process utility: non-superuser attempting SET
204
204
ERROR: permission denied to set parameter "test_oat_hooks.super_var2"
205
205
ALTER 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
207
207
ERROR: permission denied to set parameter "test_oat_hooks.user_var2"
208
208
ALTER 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
210
210
ERROR: permission denied to set parameter "test_oat_hooks.super_var2"
211
211
RESET SESSION AUTHORIZATION;
212
- NOTICE: in process utility: non-superuser attempting set
212
+ NOTICE: in process utility: non-superuser attempting RESET
213
213
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [session_authorization]
214
214
NOTICE: 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
216
216
-- Turn off non-superuser permissions
217
217
SET test_oat_hooks.deny_set_variable = true;
218
- NOTICE: in process utility: superuser attempting set
218
+ NOTICE: in process utility: superuser attempting SET
219
219
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_set_variable]
220
220
NOTICE: 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
222
222
SET test_oat_hooks.deny_alter_system = true;
223
- NOTICE: in process utility: superuser attempting set
223
+ NOTICE: in process utility: superuser attempting SET
224
224
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_alter_system]
225
225
NOTICE: 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
227
227
SET test_oat_hooks.deny_object_access = true;
228
- NOTICE: in process utility: superuser attempting set
228
+ NOTICE: in process utility: superuser attempting SET
229
229
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_object_access]
230
230
NOTICE: 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
232
232
SET test_oat_hooks.deny_exec_perms = true;
233
- NOTICE: in process utility: superuser attempting set
233
+ NOTICE: in process utility: superuser attempting SET
234
234
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_exec_perms]
235
235
NOTICE: 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
237
237
SET test_oat_hooks.deny_utility_commands = true;
238
- NOTICE: in process utility: superuser attempting set
238
+ NOTICE: in process utility: superuser attempting SET
239
239
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_utility_commands]
240
240
NOTICE: 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
242
242
-- Try again as non-superuser with permissions denied
243
243
SET SESSION AUTHORIZATION regress_test_user;
244
- NOTICE: in process utility: superuser attempting set
244
+ NOTICE: in process utility: superuser attempting SET
245
245
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [session_authorization]
246
246
ERROR: permission denied: set session_authorization
247
247
SELECT * FROM regress_test_table;
@@ -266,39 +266,39 @@ NOTICE: in executor check perms: superuser finished execute
266
266
(1 row)
267
267
268
268
SET work_mem = 8192;
269
- NOTICE: in process utility: superuser attempting set
269
+ NOTICE: in process utility: superuser attempting SET
270
270
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [work_mem]
271
271
NOTICE: 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
273
273
RESET work_mem;
274
- NOTICE: in process utility: superuser attempting set
274
+ NOTICE: in process utility: superuser attempting RESET
275
275
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [work_mem]
276
276
NOTICE: 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
278
278
ALTER SYSTEM SET work_mem = 8192;
279
- NOTICE: in process utility: superuser attempting alter system
279
+ NOTICE: in process utility: superuser attempting ALTER SYSTEM
280
280
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
281
281
NOTICE: 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
283
283
ALTER SYSTEM RESET work_mem;
284
- NOTICE: in process utility: superuser attempting alter system
284
+ NOTICE: in process utility: superuser attempting ALTER SYSTEM
285
285
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
286
286
NOTICE: 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
288
288
-- try labelled drops
289
289
RESET SESSION AUTHORIZATION;
290
- NOTICE: in process utility: superuser attempting set
290
+ NOTICE: in process utility: superuser attempting RESET
291
291
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [session_authorization]
292
292
NOTICE: 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
294
294
DROP INDEX CONCURRENTLY regress_test_table_t_idx;
295
- NOTICE: in process utility: superuser attempting DropStmt
295
+ NOTICE: in process utility: superuser attempting DROP INDEX
296
296
NOTICE: in object access: superuser attempting drop (subId=0x0) [concurrent drop,]
297
297
NOTICE: 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
299
299
-- Clean up
300
300
SET test_oat_hooks.audit = false;
301
- NOTICE: in process utility: superuser attempting set
301
+ NOTICE: in process utility: superuser attempting SET
302
302
DROP ROLE regress_role_joe; -- fails
303
303
ERROR: role "regress_role_joe" cannot be dropped because some objects depend on it
304
304
DETAIL: privileges for parameter test_oat_hooks.user_var1
0 commit comments