@@ -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,20 +82,20 @@ 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
GRANT SELECT ON Table regress_test_table TO public;
87
- NOTICE: in process utility: superuser attempting GrantStmt
88
- NOTICE: in process utility: superuser finished GrantStmt
87
+ NOTICE: in process utility: superuser attempting GRANT
88
+ NOTICE: in process utility: superuser finished GRANT
89
89
CREATE FUNCTION regress_test_func (t text) RETURNS text AS $$
90
90
SELECT $1;
91
91
$$ LANGUAGE sql;
92
- NOTICE: in process utility: superuser attempting CreateFunctionStmt
92
+ NOTICE: in process utility: superuser attempting CREATE FUNCTION
93
93
NOTICE: in object access: superuser attempting create (subId=0x0) [explicit]
94
94
NOTICE: in object access: superuser finished create (subId=0x0) [explicit]
95
- NOTICE: in process utility: superuser finished CreateFunctionStmt
95
+ NOTICE: in process utility: superuser finished CREATE FUNCTION
96
96
GRANT EXECUTE ON FUNCTION regress_test_func (text) TO public;
97
- NOTICE: in process utility: superuser attempting GrantStmt
98
- NOTICE: in process utility: superuser finished GrantStmt
97
+ NOTICE: in process utility: superuser attempting GRANT
98
+ NOTICE: in process utility: superuser finished GRANT
99
99
-- Do a few things as superuser
100
100
SELECT * FROM regress_test_table;
101
101
NOTICE: in executor check perms: superuser attempting execute
@@ -113,31 +113,31 @@ NOTICE: in executor check perms: superuser finished execute
113
113
(1 row)
114
114
115
115
SET work_mem = 8192;
116
- NOTICE: in process utility: superuser attempting set
116
+ NOTICE: in process utility: superuser attempting SET
117
117
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [work_mem]
118
118
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [work_mem]
119
- NOTICE: in process utility: superuser finished set
119
+ NOTICE: in process utility: superuser finished SET
120
120
RESET work_mem;
121
- NOTICE: in process utility: superuser attempting set
121
+ NOTICE: in process utility: superuser attempting RESET
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 RESET
125
125
ALTER SYSTEM SET work_mem = 8192;
126
- NOTICE: in process utility: superuser attempting alter system
126
+ NOTICE: in process utility: superuser attempting ALTER SYSTEM
127
127
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
128
128
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x2000, alter system) [work_mem]
129
- NOTICE: in process utility: superuser finished alter system
129
+ NOTICE: in process utility: superuser finished ALTER SYSTEM
130
130
ALTER SYSTEM RESET work_mem;
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
-- Do those same things as non-superuser
136
136
SET SESSION AUTHORIZATION regress_test_user;
137
- NOTICE: in process utility: superuser attempting set
137
+ NOTICE: in process utility: superuser attempting SET
138
138
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [session_authorization]
139
139
NOTICE: in object_access_hook_str: non-superuser finished alter (subId=0x1000, set) [session_authorization]
140
- NOTICE: in process utility: non-superuser finished set
140
+ NOTICE: in process utility: non-superuser finished SET
141
141
SELECT * FROM regress_test_table;
142
142
NOTICE: in object access: non-superuser attempting namespace search (subId=0x0) [no report on violation, allowed]
143
143
LINE 1: SELECT * FROM regress_test_table;
@@ -160,83 +160,83 @@ NOTICE: in executor check perms: non-superuser finished execute
160
160
(1 row)
161
161
162
162
SET work_mem = 8192;
163
- NOTICE: in process utility: non-superuser attempting set
163
+ NOTICE: in process utility: non-superuser attempting SET
164
164
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [work_mem]
165
165
NOTICE: in object_access_hook_str: non-superuser finished alter (subId=0x1000, set) [work_mem]
166
- NOTICE: in process utility: non-superuser finished set
166
+ NOTICE: in process utility: non-superuser finished SET
167
167
RESET work_mem;
168
- NOTICE: in process utility: non-superuser attempting set
168
+ NOTICE: in process utility: non-superuser attempting RESET
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 RESET
172
172
ALTER SYSTEM SET work_mem = 8192;
173
- NOTICE: in process utility: non-superuser attempting alter system
173
+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
174
174
ERROR: permission denied to set parameter "work_mem"
175
175
ALTER SYSTEM RESET work_mem;
176
- NOTICE: in process utility: non-superuser attempting alter system
176
+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
177
177
ERROR: permission denied to set parameter "work_mem"
178
178
SET test_oat_hooks.user_var1 = true;
179
- NOTICE: in process utility: non-superuser attempting set
179
+ NOTICE: in process utility: non-superuser attempting SET
180
180
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [test_oat_hooks.user_var1]
181
181
NOTICE: in object_access_hook_str: non-superuser finished alter (subId=0x1000, set) [test_oat_hooks.user_var1]
182
- NOTICE: in process utility: non-superuser finished set
182
+ NOTICE: in process utility: non-superuser finished SET
183
183
SET test_oat_hooks.super_var1 = true;
184
- NOTICE: in process utility: non-superuser attempting set
184
+ NOTICE: in process utility: non-superuser attempting SET
185
185
ERROR: permission denied to set parameter "test_oat_hooks.super_var1"
186
186
ALTER SYSTEM SET test_oat_hooks.user_var1 = true;
187
- NOTICE: in process utility: non-superuser attempting alter system
187
+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
188
188
ERROR: permission denied to set parameter "test_oat_hooks.user_var1"
189
189
ALTER SYSTEM SET test_oat_hooks.super_var1 = true;
190
- NOTICE: in process utility: non-superuser attempting alter system
190
+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
191
191
ERROR: permission denied to set parameter "test_oat_hooks.super_var1"
192
192
SET test_oat_hooks.user_var2 = true;
193
- NOTICE: in process utility: non-superuser attempting set
193
+ NOTICE: in process utility: non-superuser attempting SET
194
194
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [test_oat_hooks.user_var2]
195
195
NOTICE: in object_access_hook_str: non-superuser finished alter (subId=0x1000, set) [test_oat_hooks.user_var2]
196
- NOTICE: in process utility: non-superuser finished set
196
+ NOTICE: in process utility: non-superuser finished SET
197
197
SET test_oat_hooks.super_var2 = true;
198
- NOTICE: in process utility: non-superuser attempting set
198
+ NOTICE: in process utility: non-superuser attempting SET
199
199
ERROR: permission denied to set parameter "test_oat_hooks.super_var2"
200
200
ALTER SYSTEM SET test_oat_hooks.user_var2 = true;
201
- NOTICE: in process utility: non-superuser attempting alter system
201
+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
202
202
ERROR: permission denied to set parameter "test_oat_hooks.user_var2"
203
203
ALTER SYSTEM SET test_oat_hooks.super_var2 = true;
204
- NOTICE: in process utility: non-superuser attempting alter system
204
+ NOTICE: in process utility: non-superuser attempting ALTER SYSTEM
205
205
ERROR: permission denied to set parameter "test_oat_hooks.super_var2"
206
206
RESET SESSION AUTHORIZATION;
207
- NOTICE: in process utility: non-superuser attempting set
207
+ NOTICE: in process utility: non-superuser attempting RESET
208
208
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [session_authorization]
209
209
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [session_authorization]
210
- NOTICE: in process utility: superuser finished set
210
+ NOTICE: in process utility: superuser finished RESET
211
211
-- Turn off non-superuser permissions
212
212
SET test_oat_hooks.deny_set_variable = true;
213
- NOTICE: in process utility: superuser attempting set
213
+ NOTICE: in process utility: superuser attempting SET
214
214
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [test_oat_hooks.deny_set_variable]
215
215
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.deny_set_variable]
216
- NOTICE: in process utility: superuser finished set
216
+ NOTICE: in process utility: superuser finished SET
217
217
SET test_oat_hooks.deny_alter_system = 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_alter_system]
220
220
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.deny_alter_system]
221
- NOTICE: in process utility: superuser finished set
221
+ NOTICE: in process utility: superuser finished SET
222
222
SET test_oat_hooks.deny_object_access = 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_object_access]
225
225
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.deny_object_access]
226
- NOTICE: in process utility: superuser finished set
226
+ NOTICE: in process utility: superuser finished SET
227
227
SET test_oat_hooks.deny_exec_perms = 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_exec_perms]
230
230
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.deny_exec_perms]
231
- NOTICE: in process utility: superuser finished set
231
+ NOTICE: in process utility: superuser finished SET
232
232
SET test_oat_hooks.deny_utility_commands = 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_utility_commands]
235
235
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [test_oat_hooks.deny_utility_commands]
236
- NOTICE: in process utility: superuser finished set
236
+ NOTICE: in process utility: superuser finished SET
237
237
-- Try again as non-superuser with permissions denied
238
238
SET SESSION AUTHORIZATION regress_test_user;
239
- NOTICE: in process utility: superuser attempting set
239
+ NOTICE: in process utility: superuser attempting SET
240
240
NOTICE: in object_access_hook_str: non-superuser attempting alter (subId=0x1000, set) [session_authorization]
241
241
ERROR: permission denied: set session_authorization
242
242
SELECT * FROM regress_test_table;
@@ -261,33 +261,33 @@ NOTICE: in executor check perms: superuser finished execute
261
261
(1 row)
262
262
263
263
SET work_mem = 8192;
264
- NOTICE: in process utility: superuser attempting set
264
+ NOTICE: in process utility: superuser attempting SET
265
265
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [work_mem]
266
266
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [work_mem]
267
- NOTICE: in process utility: superuser finished set
267
+ NOTICE: in process utility: superuser finished SET
268
268
RESET work_mem;
269
- NOTICE: in process utility: superuser attempting set
269
+ NOTICE: in process utility: superuser attempting RESET
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 RESET
273
273
ALTER SYSTEM SET work_mem = 8192;
274
- NOTICE: in process utility: superuser attempting alter system
274
+ NOTICE: in process utility: superuser attempting ALTER SYSTEM
275
275
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
276
276
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x2000, alter system) [work_mem]
277
- NOTICE: in process utility: superuser finished alter system
277
+ NOTICE: in process utility: superuser finished ALTER SYSTEM
278
278
ALTER SYSTEM RESET work_mem;
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
-- Clean up
284
284
RESET SESSION AUTHORIZATION;
285
- NOTICE: in process utility: superuser attempting set
285
+ NOTICE: in process utility: superuser attempting RESET
286
286
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [session_authorization]
287
287
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [session_authorization]
288
- NOTICE: in process utility: superuser finished set
288
+ NOTICE: in process utility: superuser finished RESET
289
289
SET test_oat_hooks.audit = false;
290
- NOTICE: in process utility: superuser attempting set
290
+ NOTICE: in process utility: superuser attempting SET
291
291
DROP ROLE regress_role_joe; -- fails
292
292
ERROR: role "regress_role_joe" cannot be dropped because some objects depend on it
293
293
DETAIL: privileges for parameter test_oat_hooks.user_var1
0 commit comments