Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
72335a20
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,发现更多精彩内容 >>
提交
72335a20
编写于
6月 09, 2012
作者:
S
Simon Riggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add ERROR msg for GLOBAL/LOCAL TEMP is not yet implemented
上级
37255705
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
71 addition
and
6 deletion
+71
-6
src/backend/parser/gram.y
src/backend/parser/gram.y
+50
-6
src/test/regress/expected/create_table.out
src/test/regress/expected/create_table.out
+16
-0
src/test/regress/sql/create_table.sql
src/test/regress/sql/create_table.sql
+5
-0
未找到文件。
src/backend/parser/gram.y
浏览文件 @
72335a20
...
...
@@ -2507,15 +2507,43 @@ CreateStmt: CREATE OptTemp TABLE qualified_name '(' OptTableElementList ')'
* Redundancy here is needed to avoid shift/reduce conflicts,
* since TEMP is not a reserved word. See also OptTempTableName.
*
* NOTE: we accept both GLOBAL and LOCAL options; since we have no modules
* the LOCAL keyword is really meaningless.
* NOTE: we don't accept either the GLOBAL or LOCAL options: not yet implemented.
*/
OptTemp: TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| TEMP { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMP { $$ = RELPERSISTENCE_TEMP; }
| GLOBAL TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| GLOBAL TEMP { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMPORARY
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("LOCAL TEMPORARY not yet implemented"),
parser_errposition(@1)));
$$ = RELPERSISTENCE_TEMP;
}
| LOCAL TEMP
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("LOCAL TEMPORARY not yet implemented"),
parser_errposition(@1)));
$$ = RELPERSISTENCE_TEMP;
}
| GLOBAL TEMPORARY
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("GLOBAL TEMPORARY not yet implemented"),
parser_errposition(@1)));
$$ = RELPERSISTENCE_TEMP;
}
| GLOBAL TEMP
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("GLOBAL TEMPORARY not yet implemented"),
parser_errposition(@1)));
$$ = RELPERSISTENCE_TEMP;
}
| UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; }
| /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; }
;
...
...
@@ -8921,21 +8949,37 @@ OptTempTableName:
| LOCAL TEMPORARY opt_table qualified_name
{
$$ = $4;
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("LOCAL TEMPORARY not yet implemented"),
parser_errposition(@1)));
$$->relpersistence = RELPERSISTENCE_TEMP;
}
| LOCAL TEMP opt_table qualified_name
{
$$ = $4;
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("LOCAL TEMPORARY not yet implemented"),
parser_errposition(@1)));
$$->relpersistence = RELPERSISTENCE_TEMP;
}
| GLOBAL TEMPORARY opt_table qualified_name
{
$$ = $4;
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("GLOBAL TEMPORARY not yet implemented"),
parser_errposition(@1)));
$$->relpersistence = RELPERSISTENCE_TEMP;
}
| GLOBAL TEMP opt_table qualified_name
{
$$ = $4;
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("GLOBAL TEMPORARY not yet implemented"),
parser_errposition(@1)));
$$->relpersistence = RELPERSISTENCE_TEMP;
}
| UNLOGGED opt_table qualified_name
...
...
src/test/regress/expected/create_table.out
浏览文件 @
72335a20
...
...
@@ -220,3 +220,19 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "doubly_temp_pkey
CREATE TEMP TABLE public.temp_to_perm (a int primary key); -- not OK
ERROR: cannot create temporary relation in non-temporary schema
DROP TABLE unlogged1, public.unlogged2;
CREATE GLOBAL TEMPORARY TABLE global_temp1 (a int, b text); -- not yet OK
ERROR: GLOBAL TEMPORARY not yet implemented
LINE 1: CREATE GLOBAL TEMPORARY TABLE global_temp1 (a int, b text);
^
CREATE GLOBAL TEMP TABLE global_temp2 (a int, b text); -- not yet OK
ERROR: GLOBAL TEMPORARY not yet implemented
LINE 1: CREATE GLOBAL TEMP TABLE global_temp2 (a int, b text);
^
CREATE LOCAL TEMP TABLE local_temp (a int, b text); -- not yet OK
ERROR: LOCAL TEMPORARY not yet implemented
LINE 1: CREATE LOCAL TEMP TABLE local_temp (a int, b text);
^
CREATE LOCAL TEMP TABLE local_temp (a int, b text); -- not yet OK
ERROR: LOCAL TEMPORARY not yet implemented
LINE 1: CREATE LOCAL TEMP TABLE local_temp (a int, b text);
^
src/test/regress/sql/create_table.sql
浏览文件 @
72335a20
...
...
@@ -250,3 +250,8 @@ CREATE TEMP TABLE explicitly_temp (a int primary key); -- also OK
CREATE
TEMP
TABLE
pg_temp
.
doubly_temp
(
a
int
primary
key
);
-- also OK
CREATE
TEMP
TABLE
public
.
temp_to_perm
(
a
int
primary
key
);
-- not OK
DROP
TABLE
unlogged1
,
public
.
unlogged2
;
CREATE
GLOBAL
TEMPORARY
TABLE
global_temp1
(
a
int
,
b
text
);
-- not yet OK
CREATE
GLOBAL
TEMP
TABLE
global_temp2
(
a
int
,
b
text
);
-- not yet OK
CREATE
LOCAL
TEMP
TABLE
local_temp
(
a
int
,
b
text
);
-- not yet OK
CREATE
LOCAL
TEMP
TABLE
local_temp
(
a
int
,
b
text
);
-- not yet OK
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录