Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
80c5fea9
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,发现更多精彩内容 >>
提交
80c5fea9
编写于
1月 18, 2000
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Since this patch is not big I send it here instead. I do not have the
complete source checked out so I cannot commit it myself. Michael
上级
0cb6bc70
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
102 addition
and
12 deletion
+102
-12
src/backend/parser/gram.y
src/backend/parser/gram.y
+102
-12
未找到文件。
src/backend/parser/gram.y
浏览文件 @
80c5fea9
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.1
29 2000/01/18 06:12:0
3 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.1
30 2000/01/18 19:08:1
3 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -156,7 +156,7 @@ static Node *doNegate(Node *n);
database_name, access_method_clause, access_method, attr_name,
class, index_name, name, func_name, file_name, aggr_argtype
%type <str> opt_id,
opt_portal_name,
%type <str> opt_id,
all_Op, MathOp, opt_name, opt_unique,
OptUseOp, opt_class, SpecialRuleRelation
...
...
@@ -199,7 +199,7 @@ static Node *doNegate(Node *n);
opt_with_copy, index_opt_unique, opt_verbose, opt_analyze
%type <boolean> opt_cursor
%type <ival> copy_dirn, def_type,
opt_
direction, remove_type,
%type <ival> copy_dirn, def_type, direction, remove_type,
opt_column, event, comment_type, comment_cl,
comment_ag, comment_fn, comment_op, comment_tg
...
...
@@ -1861,7 +1861,7 @@ comment_text: Sconst { $$ = $1; }
*
*****************************************************************************/
FetchStmt: FETCH
opt_direction fetch_how_many opt_portal_
name
FetchStmt: FETCH
direction fetch_how_many from_in
name
{
FetchStmt *n = makeNode(FetchStmt);
if ($2 == RELATIVE)
...
...
@@ -1877,11 +1877,60 @@ FetchStmt: FETCH opt_direction fetch_how_many opt_portal_name
}
n->direction = $2;
n->howMany = $3;
n->portalname = $5;
n->ismove = false;
$$ = (Node *)n;
}
| FETCH fetch_how_many from_in name
{
FetchStmt *n = makeNode(FetchStmt);
if ($2 < 0)
{
n->howMany = -$2;
n->direction = BACKWARD;
}
else
{
n->direction = FORWARD;
n->howMany = $2;
}
n->portalname = $4;
n->ismove = false;
$$ = (Node *)n;
}
| FETCH direction from_in name
{
FetchStmt *n = makeNode(FetchStmt);
if ($2 == RELATIVE)
{
$2 = FORWARD;
}
n->direction = $2;
n->howMany = 1;
n->portalname = $4;
n->ismove = false;
$$ = (Node *)n;
}
| MOVE opt_direction fetch_how_many opt_portal_name
| FETCH from_in name
{
FetchStmt *n = makeNode(FetchStmt);
n->direction = FORWARD;
n->howMany = 1;
n->portalname = $3;
n->ismove = false;
$$ = (Node *)n;
}
| FETCH name
{
FetchStmt *n = makeNode(FetchStmt);
n->direction = FORWARD;
n->howMany = 1;
n->portalname = $2;
n->ismove = false;
$$ = (Node *)n;
}
| MOVE direction fetch_how_many from_in name
{
FetchStmt *n = makeNode(FetchStmt);
if ($3 < 0)
...
...
@@ -1891,13 +1940,57 @@ FetchStmt: FETCH opt_direction fetch_how_many opt_portal_name
}
n->direction = $2;
n->howMany = $3;
n->portalname = $5;
n->ismove = TRUE;
$$ = (Node *)n;
}
| MOVE fetch_how_many from_in name
{
FetchStmt *n = makeNode(FetchStmt);
if ($2 < 0)
{
n->howMany = -$2;
n->direction = BACKWARD;
}
else
{
n->direction = FORWARD;
n->howMany = $2;
}
n->portalname = $4;
n->ismove = TRUE;
$$ = (Node *)n;
}
| MOVE direction from_in name
{
FetchStmt *n = makeNode(FetchStmt);
n->direction = $2;
n->howMany = 1;
n->portalname = $4;
n->ismove = TRUE;
$$ = (Node *)n;
}
| MOVE from_in name
{
FetchStmt *n = makeNode(FetchStmt);
n->direction = FORWARD;
n->howMany = 1;
n->portalname = $3;
n->ismove = TRUE;
$$ = (Node *)n;
}
| MOVE name
{
FetchStmt *n = makeNode(FetchStmt);
n->direction = FORWARD;
n->howMany = 1;
n->portalname = $2;
n->ismove = TRUE;
$$ = (Node *)n;
}
;
opt_
direction: FORWARD { $$ = FORWARD; }
direction: FORWARD { $$ = FORWARD; }
| BACKWARD { $$ = BACKWARD; }
| RELATIVE { $$ = RELATIVE; }
| ABSOLUTE
...
...
@@ -1905,7 +1998,6 @@ opt_direction: FORWARD { $$ = FORWARD; }
elog(NOTICE,"FETCH/ABSOLUTE not supported, using RELATIVE");
$$ = RELATIVE;
}
| /*EMPTY*/ { $$ = FORWARD; /* default */ }
;
fetch_how_many: Iconst { $$ = $1; }
...
...
@@ -1913,13 +2005,11 @@ fetch_how_many: Iconst { $$ = $1; }
| ALL { $$ = 0; /* 0 means fetch all tuples*/ }
| NEXT { $$ = 1; }
| PRIOR { $$ = -1; }
| /*EMPTY*/ { $$ = 1; /*default*/ }
;
opt_portal_name: IN name { $$ = $2; }
| FROM name { $$ = $2; }
| /*EMPTY*/ { $$ = NULL; }
;
from_in: IN
| FROM
;
/*****************************************************************************
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录