Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
3301c835
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,发现更多精彩内容 >>
提交
3301c835
编写于
10月 19, 2011
作者:
R
Robert Haas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add some more regression tests for DROP IF EXISTS.
KaiGai Kohei
上级
3716ab2c
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
264 addition
and
12 deletion
+264
-12
src/test/regress/expected/drop_if_exists.out
src/test/regress/expected/drop_if_exists.out
+142
-4
src/test/regress/sql/drop_if_exists.sql
src/test/regress/sql/drop_if_exists.sql
+122
-8
未找到文件。
src/test/regress/expected/drop_if_exists.out
浏览文件 @
3301c835
...
...
@@ -61,10 +61,6 @@ CREATE domain test_domain_exists as int not null check (value > 0);
DROP DOMAIN IF EXISTS test_domain_exists;
DROP DOMAIN test_domain_exists;
ERROR: type "test_domain_exists" does not exist
-- drop the table
DROP TABLE IF EXISTS test_exists;
DROP TABLE test_exists;
ERROR: table "test_exists" does not exist
---
--- role/user/group
---
...
...
@@ -89,3 +85,145 @@ DROP GROUP IF EXISTS tg1, tg2;
NOTICE: role "tg2" does not exist, skipping
DROP GROUP tg1;
ERROR: role "tg1" does not exist
-- collation
DROP COLLATION test_collation_exists;
ERROR: collation "test_collation_exists" for encoding "UTF8" does not exist
DROP COLLATION IF EXISTS test_collation_exists;
NOTICE: collation "test_collation_exists" does not exist, skipping
CREATE COLLATION test_collation_exists FROM "POSIX";
DROP COLLATION test_collation_exists;
-- conversion
DROP CONVERSION test_conversion_exists;
ERROR: conversion "test_conversion_exists" does not exist
DROP CONVERSION IF EXISTS test_conversion_exists;
NOTICE: conversion "test_conversion_exists" does not exist, skipping
CREATE CONVERSION test_conversion_exists
FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;
DROP CONVERSION test_conversion_exists;
-- text search parser
DROP TEXT SEARCH PARSER test_tsparser_exists;
ERROR: text search parser "test_tsparser_exists" does not exist
DROP TEXT SEARCH PARSER IF EXISTS test_tsparser_exists;
NOTICE: text search parser "test_tsparser_exists" does not exist, skipping
-- text search dictionary
DROP TEXT SEARCH DICTIONARY test_tsdict_exists;
ERROR: text search dictionary "test_tsdict_exists" does not exist
DROP TEXT SEARCH DICTIONARY IF EXISTS test_tsdict_exists;
NOTICE: text search dictionary "test_tsdict_exists" does not exist, skipping
CREATE TEXT SEARCH DICTIONARY test_tsdict_exists (
Template=ispell,
DictFile=ispell_sample,
AffFile=ispell_sample
);
DROP TEXT SEARCH DICTIONARY test_tsdict_exists;
-- test search template
DROP TEXT SEARCH TEMPLATE test_tstemplate_exists;
ERROR: text search template "test_tstemplate_exists" does not exist
DROP TEXT SEARCH TEMPLATE IF EXISTS test_tstemplate_exists;
NOTICE: text search template "test_tstemplate_exists" does not exist, skipping
-- text search configuration
DROP TEXT SEARCH CONFIGURATION test_tsconfig_exists;
ERROR: text search configuration "test_tsconfig_exists" does not exist
DROP TEXT SEARCH CONFIGURATION IF EXISTS test_tsconfig_exists;
NOTICE: text search configuration "test_tsconfig_exists" does not exist, skipping
CREATE TEXT SEARCH CONFIGURATION test_tsconfig_exists (COPY=english);
DROP TEXT SEARCH CONFIGURATION test_tsconfig_exists;
-- extension
DROP EXTENSION test_extension_exists;
ERROR: extension "test_extension_exists" does not exist
DROP EXTENSION IF EXISTS test_extension_exists;
NOTICE: extension "test_extension_exists" does not exist, skipping
-- functions
DROP FUNCTION test_function_exists();
ERROR: function test_function_exists() does not exist
DROP FUNCTION IF EXISTS test_function_exists();
NOTICE: function test_function_exists() does not exist, skipping
DROP FUNCTION test_function_exists(int, text, int[]);
ERROR: function test_function_exists(integer, text, integer[]) does not exist
DROP FUNCTION IF EXISTS test_function_exists(int, text, int[]);
NOTICE: function test_function_exists(pg_catalog.int4,text,pg_catalog.int4[]) does not exist, skipping
-- aggregate
DROP AGGREGATE test_aggregate_exists(*);
ERROR: aggregate test_aggregate_exists(*) does not exist
DROP AGGREGATE IF EXISTS test_aggregate_exists(*);
NOTICE: aggregate test_aggregate_exists() does not exist, skipping
DROP AGGREGATE test_aggregate_exists(int);
ERROR: aggregate test_aggregate_exists(integer) does not exist
DROP AGGREGATE IF EXISTS test_aggregate_exists(int);
NOTICE: aggregate test_aggregate_exists(pg_catalog.int4) does not exist, skipping
-- operator
DROP OPERATOR @#@ (int, int);
ERROR: operator does not exist: integer @#@ integer
DROP OPERATOR IF EXISTS @#@ (int, int);
NOTICE: operator @#@ does not exist, skipping
CREATE OPERATOR @#@
(leftarg = int8, rightarg = int8, procedure = int8xor);
DROP OPERATOR @#@ (int8, int8);
-- language
DROP LANGUAGE test_language_exists;
ERROR: language "test_language_exists" does not exist
DROP LANGUAGE IF EXISTS test_language_exists;
NOTICE: language "test_language_exists" does not exist, skipping
-- cast
DROP CAST (text AS text);
ERROR: cast from type text to type text does not exist
DROP CAST IF EXISTS (text AS text);
NOTICE: cast from type text to type text does not exist, skipping
-- trigger
DROP TRIGGER test_trigger_exists ON test_exists;
ERROR: trigger "test_trigger_exists" for table "test_exists" does not exist
DROP TRIGGER IF EXISTS test_trigger_exists ON test_exists;
NOTICE: trigger "test_trigger_exists" for table "test_exists" does not exist, skipping
DROP TRIGGER test_trigger_exists ON no_such_table;
ERROR: relation "no_such_table" does not exist
DROP TRIGGER IF EXISTS test_trigger_exists ON no_such_table;
ERROR: relation "no_such_table" does not exist
CREATE TRIGGER test_trigger_exists
BEFORE UPDATE ON test_exists
FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger();
DROP TRIGGER test_trigger_exists ON test_exists;
-- rule
DROP RULE test_rule_exists ON test_exists;
ERROR: rule "test_rule_exists" for relation "test_exists" does not exist
DROP RULE IF EXISTS test_rule_exists ON test_exists;
NOTICE: rule "test_rule_exists" for relation "test_exists" does not exist, skipping
DROP RULE test_rule_exists ON no_such_table;
ERROR: relation "no_such_table" does not exist
DROP RULE IF EXISTS test_rule_exists ON no_such_table;
ERROR: relation "no_such_table" does not exist
CREATE RULE test_rule_exists AS ON INSERT TO test_exists
DO INSTEAD
INSERT INTO test_exists VALUES (NEW.a, NEW.b || NEW.a::text);
DROP RULE test_rule_exists ON test_exists;
-- foreign data wrapper
DROP FOREIGN DATA WRAPPER test_fdw_exists;
ERROR: foreign-data wrapper "test_fdw_exists" does not exist
DROP FOREIGN DATA WRAPPER IF EXISTS test_fdw_exists;
NOTICE: foreign-data wrapper "test_fdw_exists" does not exist, skipping
-- foreign server
DROP SERVER test_server_exists;
ERROR: server "test_server_exists" does not exist
DROP SERVER IF EXISTS test_server_exists;
NOTICE: server "test_server_exists" does not exist, skipping
-- operator class
DROP OPERATOR CLASS test_operator_class USING btree;
ERROR: operator class "test_operator_class" does not exist for access method "btree"
DROP OPERATOR CLASS IF EXISTS test_operator_class USING btree;
NOTICE: operator class "test_operator_class" does not exist for access method "btree"
DROP OPERATOR CLASS test_operator_class USING no_such_am;
ERROR: access method "no_such_am" does not exist
DROP OPERATOR CLASS IF EXISTS test_operator_class USING no_such_am;
ERROR: access method "no_such_am" does not exist
-- operator family
DROP OPERATOR FAMILY test_operator_family USING btree;
ERROR: operator family "test_operator_family" does not exist for access method "btree"
DROP OPERATOR FAMILY IF EXISTS test_operator_family USING btree;
ERROR: operator family "test_operator_family" does not exist for access method "btree"
DROP OPERATOR FAMILY test_operator_family USING no_such_am;
ERROR: access method "no_such_am" does not exist
DROP OPERATOR FAMILY IF EXISTS test_operator_family USING no_such_am;
ERROR: access method "no_such_am" does not exist
-- drop the table
DROP TABLE IF EXISTS test_exists;
DROP TABLE test_exists;
ERROR: table "test_exists" does not exist
src/test/regress/sql/drop_if_exists.sql
浏览文件 @
3301c835
...
...
@@ -82,14 +82,6 @@ DROP DOMAIN IF EXISTS test_domain_exists;
DROP
DOMAIN
test_domain_exists
;
-- drop the table
DROP
TABLE
IF
EXISTS
test_exists
;
DROP
TABLE
test_exists
;
---
--- role/user/group
---
...
...
@@ -115,3 +107,125 @@ DROP GROUP tg2;
DROP
GROUP
IF
EXISTS
tg1
,
tg2
;
DROP
GROUP
tg1
;
-- collation
DROP
COLLATION
test_collation_exists
;
DROP
COLLATION
IF
EXISTS
test_collation_exists
;
CREATE
COLLATION
test_collation_exists
FROM
"POSIX"
;
DROP
COLLATION
test_collation_exists
;
-- conversion
DROP
CONVERSION
test_conversion_exists
;
DROP
CONVERSION
IF
EXISTS
test_conversion_exists
;
CREATE
CONVERSION
test_conversion_exists
FOR
'LATIN1'
TO
'UTF8'
FROM
iso8859_1_to_utf8
;
DROP
CONVERSION
test_conversion_exists
;
-- text search parser
DROP
TEXT
SEARCH
PARSER
test_tsparser_exists
;
DROP
TEXT
SEARCH
PARSER
IF
EXISTS
test_tsparser_exists
;
-- text search dictionary
DROP
TEXT
SEARCH
DICTIONARY
test_tsdict_exists
;
DROP
TEXT
SEARCH
DICTIONARY
IF
EXISTS
test_tsdict_exists
;
CREATE
TEXT
SEARCH
DICTIONARY
test_tsdict_exists
(
Template
=
ispell
,
DictFile
=
ispell_sample
,
AffFile
=
ispell_sample
);
DROP
TEXT
SEARCH
DICTIONARY
test_tsdict_exists
;
-- test search template
DROP
TEXT
SEARCH
TEMPLATE
test_tstemplate_exists
;
DROP
TEXT
SEARCH
TEMPLATE
IF
EXISTS
test_tstemplate_exists
;
-- text search configuration
DROP
TEXT
SEARCH
CONFIGURATION
test_tsconfig_exists
;
DROP
TEXT
SEARCH
CONFIGURATION
IF
EXISTS
test_tsconfig_exists
;
CREATE
TEXT
SEARCH
CONFIGURATION
test_tsconfig_exists
(
COPY
=
english
);
DROP
TEXT
SEARCH
CONFIGURATION
test_tsconfig_exists
;
-- extension
DROP
EXTENSION
test_extension_exists
;
DROP
EXTENSION
IF
EXISTS
test_extension_exists
;
-- functions
DROP
FUNCTION
test_function_exists
();
DROP
FUNCTION
IF
EXISTS
test_function_exists
();
DROP
FUNCTION
test_function_exists
(
int
,
text
,
int
[]);
DROP
FUNCTION
IF
EXISTS
test_function_exists
(
int
,
text
,
int
[]);
-- aggregate
DROP
AGGREGATE
test_aggregate_exists
(
*
);
DROP
AGGREGATE
IF
EXISTS
test_aggregate_exists
(
*
);
DROP
AGGREGATE
test_aggregate_exists
(
int
);
DROP
AGGREGATE
IF
EXISTS
test_aggregate_exists
(
int
);
-- operator
DROP
OPERATOR
@#@
(
int
,
int
);
DROP
OPERATOR
IF
EXISTS
@#@
(
int
,
int
);
CREATE
OPERATOR
@#@
(
leftarg
=
int8
,
rightarg
=
int8
,
procedure
=
int8xor
);
DROP
OPERATOR
@#@
(
int8
,
int8
);
-- language
DROP
LANGUAGE
test_language_exists
;
DROP
LANGUAGE
IF
EXISTS
test_language_exists
;
-- cast
DROP
CAST
(
text
AS
text
);
DROP
CAST
IF
EXISTS
(
text
AS
text
);
-- trigger
DROP
TRIGGER
test_trigger_exists
ON
test_exists
;
DROP
TRIGGER
IF
EXISTS
test_trigger_exists
ON
test_exists
;
DROP
TRIGGER
test_trigger_exists
ON
no_such_table
;
DROP
TRIGGER
IF
EXISTS
test_trigger_exists
ON
no_such_table
;
CREATE
TRIGGER
test_trigger_exists
BEFORE
UPDATE
ON
test_exists
FOR
EACH
ROW
EXECUTE
PROCEDURE
suppress_redundant_updates_trigger
();
DROP
TRIGGER
test_trigger_exists
ON
test_exists
;
-- rule
DROP
RULE
test_rule_exists
ON
test_exists
;
DROP
RULE
IF
EXISTS
test_rule_exists
ON
test_exists
;
DROP
RULE
test_rule_exists
ON
no_such_table
;
DROP
RULE
IF
EXISTS
test_rule_exists
ON
no_such_table
;
CREATE
RULE
test_rule_exists
AS
ON
INSERT
TO
test_exists
DO
INSTEAD
INSERT
INTO
test_exists
VALUES
(
NEW
.
a
,
NEW
.
b
||
NEW
.
a
::
text
);
DROP
RULE
test_rule_exists
ON
test_exists
;
-- foreign data wrapper
DROP
FOREIGN
DATA
WRAPPER
test_fdw_exists
;
DROP
FOREIGN
DATA
WRAPPER
IF
EXISTS
test_fdw_exists
;
-- foreign server
DROP
SERVER
test_server_exists
;
DROP
SERVER
IF
EXISTS
test_server_exists
;
-- operator class
DROP
OPERATOR
CLASS
test_operator_class
USING
btree
;
DROP
OPERATOR
CLASS
IF
EXISTS
test_operator_class
USING
btree
;
DROP
OPERATOR
CLASS
test_operator_class
USING
no_such_am
;
DROP
OPERATOR
CLASS
IF
EXISTS
test_operator_class
USING
no_such_am
;
-- operator family
DROP
OPERATOR
FAMILY
test_operator_family
USING
btree
;
DROP
OPERATOR
FAMILY
IF
EXISTS
test_operator_family
USING
btree
;
DROP
OPERATOR
FAMILY
test_operator_family
USING
no_such_am
;
DROP
OPERATOR
FAMILY
IF
EXISTS
test_operator_family
USING
no_such_am
;
-- drop the table
DROP
TABLE
IF
EXISTS
test_exists
;
DROP
TABLE
test_exists
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录