Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
65e6d421
Commit
65e6d421
authored
Jun 25, 2019
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow the rule that regression-test-created roles are named "regress_xxx".
contrib/amcheck didn't get the memo either.
parent
c360477d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
contrib/amcheck/expected/check_btree.out
contrib/amcheck/expected/check_btree.out
+9
-9
contrib/amcheck/sql/check_btree.sql
contrib/amcheck/sql/check_btree.sql
+9
-9
No files found.
contrib/amcheck/expected/check_btree.out
View file @
65e6d421
...
...
@@ -14,9 +14,9 @@ CREATE INDEX bttest_a_idx ON bttest_a USING btree (id);
CREATE INDEX bttest_b_idx ON bttest_b USING btree (id);
CREATE UNIQUE INDEX bttest_multi_idx ON bttest_multi
USING btree (id) INCLUDE (data);
CREATE ROLE bttest_role;
CREATE ROLE
regress_
bttest_role;
-- verify permissions are checked (error due to function not callable)
SET ROLE bttest_role;
SET ROLE
regress_
bttest_role;
SELECT bt_index_check('bttest_a_idx'::regclass);
ERROR: permission denied for function bt_index_check
SELECT bt_index_parent_check('bttest_a_idx'::regclass);
...
...
@@ -25,11 +25,11 @@ RESET ROLE;
-- we, intentionally, don't check relation permissions - it's useful
-- to run this cluster-wide with a restricted account, and as tested
-- above explicit permission has to be granted for that.
GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO bttest_role;
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO bttest_role;
GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO bttest_role;
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO bttest_role;
SET ROLE bttest_role;
GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO
regress_
bttest_role;
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO
regress_
bttest_role;
GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO
regress_
bttest_role;
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO
regress_
bttest_role;
SET ROLE
regress_
bttest_role;
SELECT bt_index_check('bttest_a_idx');
bt_index_check
----------------
...
...
@@ -166,5 +166,5 @@ DROP TABLE bttest_b;
DROP TABLE bttest_multi;
DROP TABLE delete_test_table;
DROP TABLE toast_bug;
DROP OWNED BY bttest_role; -- permissions
DROP ROLE bttest_role;
DROP OWNED BY
regress_
bttest_role; -- permissions
DROP ROLE
regress_
bttest_role;
contrib/amcheck/sql/check_btree.sql
View file @
65e6d421
...
...
@@ -18,10 +18,10 @@ CREATE INDEX bttest_b_idx ON bttest_b USING btree (id);
CREATE
UNIQUE
INDEX
bttest_multi_idx
ON
bttest_multi
USING
btree
(
id
)
INCLUDE
(
data
);
CREATE
ROLE
bttest_role
;
CREATE
ROLE
regress_
bttest_role
;
-- verify permissions are checked (error due to function not callable)
SET
ROLE
bttest_role
;
SET
ROLE
regress_
bttest_role
;
SELECT
bt_index_check
(
'bttest_a_idx'
::
regclass
);
SELECT
bt_index_parent_check
(
'bttest_a_idx'
::
regclass
);
RESET
ROLE
;
...
...
@@ -29,11 +29,11 @@ RESET ROLE;
-- we, intentionally, don't check relation permissions - it's useful
-- to run this cluster-wide with a restricted account, and as tested
-- above explicit permission has to be granted for that.
GRANT
EXECUTE
ON
FUNCTION
bt_index_check
(
regclass
)
TO
bttest_role
;
GRANT
EXECUTE
ON
FUNCTION
bt_index_parent_check
(
regclass
)
TO
bttest_role
;
GRANT
EXECUTE
ON
FUNCTION
bt_index_check
(
regclass
,
boolean
)
TO
bttest_role
;
GRANT
EXECUTE
ON
FUNCTION
bt_index_parent_check
(
regclass
,
boolean
)
TO
bttest_role
;
SET
ROLE
bttest_role
;
GRANT
EXECUTE
ON
FUNCTION
bt_index_check
(
regclass
)
TO
regress_
bttest_role
;
GRANT
EXECUTE
ON
FUNCTION
bt_index_parent_check
(
regclass
)
TO
regress_
bttest_role
;
GRANT
EXECUTE
ON
FUNCTION
bt_index_check
(
regclass
,
boolean
)
TO
regress_
bttest_role
;
GRANT
EXECUTE
ON
FUNCTION
bt_index_parent_check
(
regclass
,
boolean
)
TO
regress_
bttest_role
;
SET
ROLE
regress_
bttest_role
;
SELECT
bt_index_check
(
'bttest_a_idx'
);
SELECT
bt_index_parent_check
(
'bttest_a_idx'
);
RESET
ROLE
;
...
...
@@ -110,5 +110,5 @@ DROP TABLE bttest_b;
DROP
TABLE
bttest_multi
;
DROP
TABLE
delete_test_table
;
DROP
TABLE
toast_bug
;
DROP
OWNED
BY
bttest_role
;
-- permissions
DROP
ROLE
bttest_role
;
DROP
OWNED
BY
regress_
bttest_role
;
-- permissions
DROP
ROLE
regress_
bttest_role
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment