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

Commit450fa1b

Browse files
committed
Fix installcheck for test_rls_hooks
As pointed out by the buildfarm, test_rls_hooks wasn't functioningproperly with a clean installcheck. test_rls_hooks needs to explicitlyload the library with the hooks in it, to allow installcheck to work;using the --temp-config doesn't help since that isn't used when runninginstallcheck and it isn't exactly fair to the buildfarm to modify theinstalled config prior to calling installcheck.Also, have test_rls_hooks clean up after itself.
1 parent0bf22e0 commit450fa1b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
LOAD 'test_rls_hooks';
12
CREATE TABLE rls_test_permissive (
23
username name,
34
supervisor name,
@@ -191,3 +192,9 @@ ERROR: new row violates WITH CHECK OPTION for "rls_test_both"
191192
-- failure
192193
INSERT INTO rls_test_both VALUES ('r4','s4',7);
193194
ERROR: new row violates WITH CHECK OPTION for "rls_test_both"
195+
RESET ROLE;
196+
DROP TABLE rls_test_restrictive;
197+
DROP TABLE rls_test_permissive;
198+
DROP TABLE rls_test_both;
199+
DROP ROLE r1;
200+
DROP ROLE s1;

‎src/test/modules/test_rls_hooks/sql/test_rls_hooks.sql

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
LOAD'test_rls_hooks';
2+
13
CREATETABLErls_test_permissive (
24
username name,
35
supervisor name,
@@ -155,3 +157,12 @@ INSERT INTO rls_test_both VALUES ('r1','s1',7);
155157

156158
-- failure
157159
INSERT INTO rls_test_bothVALUES ('r4','s4',7);
160+
161+
RESET ROLE;
162+
163+
DROPTABLE rls_test_restrictive;
164+
DROPTABLE rls_test_permissive;
165+
DROPTABLE rls_test_both;
166+
167+
DROP ROLE r1;
168+
DROP ROLE s1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp