Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
4d3eab76
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4d3eab76
编写于
6月 25, 2019
作者:
T
Tom Lane
提交者:
xiong-gang
6月 08, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Follow the rule that regression-test-created roles are named "regress_xxx".
contrib/amcheck didn't get the memo either.
上级
9578a775
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
14 deletion
+14
-14
contrib/amcheck/expected/check_btree.out
contrib/amcheck/expected/check_btree.out
+7
-7
contrib/amcheck/sql/check_btree.sql
contrib/amcheck/sql/check_btree.sql
+7
-7
未找到文件。
contrib/amcheck/expected/check_btree.out
浏览文件 @
4d3eab76
...
...
@@ -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;
contrib/amcheck/sql/check_btree.sql
浏览文件 @
4d3eab76
...
...
@@ -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
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录