Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
f33c53ec
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,发现更多精彩内容 >>
提交
f33c53ec
编写于
7月 03, 2013
作者:
R
Robert Haas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Hopefully-portable regression tests for CREATE/ALTER/DROP COLLATION."
This reverts commit
26364530
. The buildfarm is sad.
上级
26364530
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
91 deletion
+0
-91
src/test/regress/expected/collate.out
src/test/regress/expected/collate.out
+0
-46
src/test/regress/sql/collate.sql
src/test/regress/sql/collate.sql
+0
-45
未找到文件。
src/test/regress/expected/collate.out
浏览文件 @
f33c53ec
...
...
@@ -626,51 +626,6 @@ SELECT collation for ((SELECT b FROM collate_test1 LIMIT 1));
"C"
(1 row)
-- CREATE COLLATE tests
CREATE COLLATION collate_coll2 FROM "C";
-- Ensure non-OWNER ROLEs are not able to ALTER/DROP COLLATION
CREATE ROLE regress_rol_col1;
GRANT USAGE ON SCHEMA collate_tests TO regress_rol_col1;
SET ROLE regress_rol_col1;
DROP COLLATION IF EXISTS collate_tests.collate_coll2;
ERROR: must be owner of collation collate_tests.collate_coll2
RESET ROLE;
-- Ensure ALTER COLLATION SET SCHEMA works as expected
CREATE SCHEMA collate_tests2;
ALTER COLLATION collate_coll2 SET SCHEMA collate_tests2;
DROP COLLATION collate_tests2.collate_coll2;
DROP SCHEMA collate_tests2;
-- Should work. Classic cases of CREATE/ALTER COLLATION
CREATE COLLATION collate_coll3 (LOCALE = 'C');
ALTER COLLATION collate_coll3 OWNER TO regress_rol_col1;
ALTER COLLATION collate_coll3 RENAME TO collate_coll33;
DROP COLLATION collate_coll33;
-- Should fail. Give redundant options
CREATE COLLATION collate_coll3a (LOCALE = 'C', LC_COLLATE = 'C', LC_CTYPE= 'C');
ERROR: conflicting or redundant options
-- Should fail. LC_COLLATE must be specified
CREATE COLLATION collate_coll5 (LC_CTYPE= 'C');
ERROR: parameter "lc_collate" must be specified
-- Should fail. Give value options without value
CREATE COLLATION collate_coll4a (LC_COLLATE = '');
ERROR: parameter "lc_ctype" must be specified
CREATE COLLATION collate_coll5a (LC_CTYPE= '');
ERROR: parameter "lc_collate" must be specified
-- Should fail. Give invalid option name
CREATE COLLATION collate_coll6 (ASDF = 'C');
ERROR: collation attribute "asdf" not recognized
-- Ensure ROLEs without USAGE access can't CREATE/ALTER COLLATION
CREATE SCHEMA collate_tests4;
CREATE COLLATION collate_tests4.collate_coll9 (LOCALE = 'C');
REVOKE USAGE ON SCHEMA collate_tests4 FROM regress_rol_col1;
SET ROLE regress_rol_col1;
ALTER COLLATION collate_tests4.collate_coll9 RENAME TO collate_coll9b;
ERROR: permission denied for schema collate_tests4
CREATE COLLATION collate_tests4.collate_coll10 (LOCALE = 'C');
ERROR: permission denied for schema collate_tests4
RESET ROLE;
DROP SCHEMA collate_tests4 CASCADE;
NOTICE: drop cascades to collation collate_coll9
--
-- Clean up. Many of these table names will be re-used if the user is
-- trying to run any platform-specific collation tests later, so we
...
...
@@ -693,4 +648,3 @@ drop cascades to function dup(anyelement)
drop cascades to table collate_test20
drop cascades to table collate_test21
drop cascades to table collate_test22
DROP ROLE regress_rol_col1;
src/test/regress/sql/collate.sql
浏览文件 @
f33c53ec
...
...
@@ -231,50 +231,6 @@ SELECT collation for ('foo'::text);
SELECT
collation
for
((
SELECT
a
FROM
collate_test1
LIMIT
1
));
-- non-collatable type - error
SELECT
collation
for
((
SELECT
b
FROM
collate_test1
LIMIT
1
));
-- CREATE COLLATE tests
CREATE
COLLATION
collate_coll2
FROM
"C"
;
-- Ensure non-OWNER ROLEs are not able to ALTER/DROP COLLATION
CREATE
ROLE
regress_rol_col1
;
GRANT
USAGE
ON
SCHEMA
collate_tests
TO
regress_rol_col1
;
SET
ROLE
regress_rol_col1
;
DROP
COLLATION
IF
EXISTS
collate_tests
.
collate_coll2
;
RESET
ROLE
;
-- Ensure ALTER COLLATION SET SCHEMA works as expected
CREATE
SCHEMA
collate_tests2
;
ALTER
COLLATION
collate_coll2
SET
SCHEMA
collate_tests2
;
DROP
COLLATION
collate_tests2
.
collate_coll2
;
DROP
SCHEMA
collate_tests2
;
-- Should work. Classic cases of CREATE/ALTER COLLATION
CREATE
COLLATION
collate_coll3
(
LOCALE
=
'C'
);
ALTER
COLLATION
collate_coll3
OWNER
TO
regress_rol_col1
;
ALTER
COLLATION
collate_coll3
RENAME
TO
collate_coll33
;
DROP
COLLATION
collate_coll33
;
-- Should fail. Give redundant options
CREATE
COLLATION
collate_coll3a
(
LOCALE
=
'C'
,
LC_COLLATE
=
'C'
,
LC_CTYPE
=
'C'
);
-- Should fail. LC_COLLATE must be specified
CREATE
COLLATION
collate_coll5
(
LC_CTYPE
=
'C'
);
-- Should fail. Give value options without value
CREATE
COLLATION
collate_coll4a
(
LC_COLLATE
=
''
);
CREATE
COLLATION
collate_coll5a
(
LC_CTYPE
=
''
);
-- Should fail. Give invalid option name
CREATE
COLLATION
collate_coll6
(
ASDF
=
'C'
);
-- Ensure ROLEs without USAGE access can't CREATE/ALTER COLLATION
CREATE
SCHEMA
collate_tests4
;
CREATE
COLLATION
collate_tests4
.
collate_coll9
(
LOCALE
=
'C'
);
REVOKE
USAGE
ON
SCHEMA
collate_tests4
FROM
regress_rol_col1
;
SET
ROLE
regress_rol_col1
;
ALTER
COLLATION
collate_tests4
.
collate_coll9
RENAME
TO
collate_coll9b
;
CREATE
COLLATION
collate_tests4
.
collate_coll10
(
LOCALE
=
'C'
);
RESET
ROLE
;
DROP
SCHEMA
collate_tests4
CASCADE
;
--
-- Clean up. Many of these table names will be re-used if the user is
...
...
@@ -282,4 +238,3 @@ DROP SCHEMA collate_tests4 CASCADE;
-- must get rid of them.
--
DROP
SCHEMA
collate_tests
CASCADE
;
DROP
ROLE
regress_rol_col1
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录