Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
80931442
Commit
80931442
authored
6 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Follow the rule that regression-test-created roles are named "regress_xxx".
contrib/amcheck didn't get the memo either.
parent
131e545a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/amcheck/expected/check_btree.out
+7
-7
7 additions, 7 deletions
contrib/amcheck/expected/check_btree.out
contrib/amcheck/sql/check_btree.sql
+7
-7
7 additions, 7 deletions
contrib/amcheck/sql/check_btree.sql
with
14 additions
and
14 deletions
contrib/amcheck/expected/check_btree.out
+
7
−
7
View file @
80931442
...
...
@@ -5,9 +5,9 @@ INSERT INTO bttest_a SELECT * FROM generate_series(1, 100000);
INSERT INTO bttest_b SELECT * FROM generate_series(100000, 1, -1);
CREATE INDEX bttest_a_idx ON bttest_a USING btree (id);
CREATE INDEX bttest_b_idx ON bttest_b USING btree (id);
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);
...
...
@@ -16,9 +16,9 @@ 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;
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;
SET ROLE
regress_
bttest_role;
SELECT bt_index_check('bttest_a_idx');
bt_index_check
----------------
...
...
@@ -88,5 +88,5 @@ COMMIT;
-- cleanup
DROP TABLE bttest_a;
DROP TABLE bttest_b;
DROP OWNED BY bttest_role; -- permissions
DROP ROLE bttest_role;
DROP OWNED BY
regress_
bttest_role; -- permissions
DROP ROLE
regress_
bttest_role;
This diff is collapsed.
Click to expand it.
contrib/amcheck/sql/check_btree.sql
+
7
−
7
View file @
80931442
...
...
@@ -8,10 +8,10 @@ INSERT INTO bttest_b SELECT * FROM generate_series(100000, 1, -1);
CREATE
INDEX
bttest_a_idx
ON
bttest_a
USING
btree
(
id
);
CREATE
INDEX
bttest_b_idx
ON
bttest_b
USING
btree
(
id
);
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
;
...
...
@@ -19,9 +19,9 @@ 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
;
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
;
SET
ROLE
regress_
bttest_role
;
SELECT
bt_index_check
(
'bttest_a_idx'
);
SELECT
bt_index_parent_check
(
'bttest_a_idx'
);
RESET
ROLE
;
...
...
@@ -57,5 +57,5 @@ COMMIT;
-- cleanup
DROP
TABLE
bttest_a
;
DROP
TABLE
bttest_b
;
DROP
OWNED
BY
bttest_role
;
-- permissions
DROP
ROLE
bttest_role
;
DROP
OWNED
BY
regress_
bttest_role
;
-- permissions
DROP
ROLE
regress_
bttest_role
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment