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

Commitb22b770

Browse files
committed
Make repeated 'make installcheck' runs work
In pg_audit, set client_min_messages up to warning, then reset the roleattributes, to completely reset the session while not making theregression tests depend on being run by any particular user.
1 parented6ea8e commitb22b770

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

‎contrib/pg_audit/expected/pg_audit.out

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,11 @@ GRANT user1 TO user2;
10541054
NOTICE: AUDIT: SESSION,59,1,ROLE,GRANT ROLE,,,GRANT user1 TO user2;,<none>
10551055
REVOKE user1 FROM user2;
10561056
NOTICE: AUDIT: SESSION,60,1,ROLE,REVOKE ROLE,,,REVOKE user1 FROM user2;,<none>
1057+
-- Cleanup
1058+
-- Set client_min_messages up to warning to avoid noise
1059+
SET client_min_messages = 'warning';
1060+
ALTER ROLE :current_user RESET pg_audit.log;
1061+
ALTER ROLE :current_user RESET pg_audit.log_level;
10571062
DROP TABLE test.account_copy;
10581063
DROP TABLE test.test_insert;
10591064
DROP SCHEMA test;
@@ -1064,8 +1069,6 @@ DROP TABLE hoge;
10641069
DROP TABLE account;
10651070
DROP TABLE account_role_map;
10661071
DROP USER user2;
1067-
NOTICE: AUDIT: SESSION,61,1,ROLE,DROP ROLE,,,DROP USER user2;,<none>
10681072
DROP USER user1;
1069-
NOTICE: AUDIT: SESSION,62,1,ROLE,DROP ROLE,,,DROP USER user1;,<none>
10701073
DROP ROLE auditor;
1071-
NOTICE: AUDIT: SESSION,63,1,ROLE,DROP ROLE,,,DROP ROLE auditor;,<none>
1074+
RESET client_min_messages;

‎contrib/pg_audit/sql/pg_audit.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,13 @@ SET pg_audit.log = 'role';
646646
GRANT user1 TO user2;
647647
REVOKE user1FROM user2;
648648

649+
-- Cleanup
650+
-- Set client_min_messages up to warning to avoid noise
651+
SET client_min_messages='warning';
652+
653+
ALTER ROLE :current_user RESETpg_audit.log;
654+
ALTER ROLE :current_user RESETpg_audit.log_level;
655+
649656
DROPTABLEtest.account_copy;
650657
DROPTABLEtest.test_insert;
651658
DROPSCHEMA test;
@@ -658,3 +665,5 @@ DROP TABLE account_role_map;
658665
DROPUSER user2;
659666
DROPUSER user1;
660667
DROP ROLE auditor;
668+
669+
RESET client_min_messages;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp