Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita3b071b

Browse files
committed
Tidy up Object Access hooks tests
per gripelet from Tom Lane.
1 parentf0206d9 commita3b071b

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

‎src/test/modules/test_oat_hooks/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
# src/test/modules/test_oat_hooks/Makefile
22

33
MODULE_big = test_oat_hooks
4-
OBJS =\
5-
$(WIN32RES)\
6-
test_oat_hooks.o
4+
OBJS = test_oat_hooks.o$(WIN32RES)
75
PGFILEDESC = "test_oat_hooks - example use of object access hooks"
86

97
REGRESS = test_oat_hooks
10-
NO_INSTALLCHECK = 1
118

129
ifdefUSE_PGXS
1310
PG_CONFIG = pg_config

‎src/test/modules/test_oat_hooks/expected/test_oat_hooks.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ NOTICE: in process utility: superuser attempting set
155155
NOTICE: in object_access_hook_str: superuser attempting alter (set) [test_oat_hooks.deny_utility_commands]
156156
NOTICE: in object_access_hook_str: superuser finished alter (set) [test_oat_hooks.deny_utility_commands]
157157
NOTICE: in process utility: superuser finished set
158-
-- Try again as non-superuser withpermisisons denied
158+
-- Try again as non-superuser withpermissions denied
159159
SET SESSION AUTHORIZATION regress_test_user;
160160
NOTICE: in process utility: superuser attempting set
161161
NOTICE: in object_access_hook_str: non-superuser attempting alter (set) [session_authorization]

‎src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ SET test_oat_hooks.deny_object_access = true;
3939
SETtest_oat_hooks.deny_exec_perms= true;
4040
SETtest_oat_hooks.deny_utility_commands= true;
4141

42-
-- Try again as non-superuser withpermisisons denied
42+
-- Try again as non-superuser withpermissions denied
4343
SET SESSION AUTHORIZATION regress_test_user;
4444
SELECT*FROM regress_test_table;
4545
SELECT regress_test_func('arg');

‎src/test/modules/test_oat_hooks/test_oat_hooks.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ _PG_fini(void)
192192
staticvoid
193193
emit_audit_message(constchar*type,constchar*hook,char*action,char*objName)
194194
{
195+
/*
196+
* Ensure that audit messages are not duplicated by only emitting them from
197+
* a leader process, not a worker process. This makes the test results
198+
* deterministic even if run with force_parallel_mode = regress.
199+
*/
195200
if (REGRESS_audit&& !IsParallelWorker())
196201
{
197202
constchar*who=superuser_arg(GetUserId()) ?"superuser" :"non-superuser";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp