Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
317215fc
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,发现更多精彩内容 >>
提交
317215fc
编写于
12月 22, 2000
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up CREATE TYPE/OPERATOR/AGGREGATE productions, so that parser
will not accept types named with operator names or vice versa.
上级
4ce226ee
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
27 addition
and
28 deletion
+27
-28
src/backend/parser/gram.y
src/backend/parser/gram.y
+27
-28
未找到文件。
src/backend/parser/gram.y
浏览文件 @
317215fc
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.21
1 2000/12/03 14:50:54 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.21
2 2000/12/22 07:07:58 tgl
Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -161,7 +161,7 @@ static void doNegateFloat(Value *v);
%type <str> TriggerEvents
%type <value> TriggerFuncArg
%type <str> relation_name, copy_file_name, copy_delimiter, copy_null,
def_name,
%type <str> relation_name, copy_file_name, copy_delimiter, copy_null,
database_name, access_method_clause, access_method, attr_name,
class, index_name, name, func_name, file_name
...
...
@@ -206,7 +206,7 @@ static void doNegateFloat(Value *v);
opt_with_copy, index_opt_unique, opt_verbose, opt_analyze
%type <boolean> opt_cursor
%type <ival> copy_dirn, d
ef_type, d
irection, reindex_type, drop_type,
%type <ival> copy_dirn, direction, reindex_type, drop_type,
opt_column, event, comment_type, comment_cl,
comment_ag, comment_fn, comment_op, comment_tg
...
...
@@ -1635,7 +1635,7 @@ IntegerOnly: Iconst
*****************************************************************************/
CreatePLangStmt: CREATE PLangTrusted opt_procedural LANGUAGE Sconst
HANDLER
def
_name LANCOMPILER Sconst
HANDLER
func
_name LANCOMPILER Sconst
{
CreatePLangStmt *n = makeNode(CreatePLangStmt);
n->plname = $5;
...
...
@@ -1854,29 +1854,34 @@ DropTrigStmt: DROP TRIGGER name ON relation_name
/*****************************************************************************
*
* QUERY :
* define (
type,operator,aggregat
e)
* define (
aggregate,operator,typ
e)
*
*****************************************************************************/
DefineStmt: CREATE
def_type def
_name definition
DefineStmt: CREATE
AGGREGATE func
_name definition
{
DefineStmt *n = makeNode(DefineStmt);
n->defType = $2;
n->defType = AGGREGATE;
n->defname = $3;
n->definition = $4;
$$ = (Node *)n;
}
| CREATE OPERATOR all_Op definition
{
DefineStmt *n = makeNode(DefineStmt);
n->defType = OPERATOR;
n->defname = $3;
n->definition = $4;
$$ = (Node *)n;
}
| CREATE TYPE_P name definition
{
DefineStmt *n = makeNode(DefineStmt);
n->defType = TYPE_P;
n->defname = $3;
n->definition = $4;
$$ = (Node *)n;
}
;
def_type: OPERATOR { $$ = OPERATOR; }
| TYPE_P { $$ = TYPE_P; }
| AGGREGATE { $$ = AGGREGATE; }
;
def_name: PROCEDURE { $$ = "procedure"; }
| JOIN { $$ = "join"; }
| all_Op { $$ = $1; }
| ColId { $$ = $1; }
;
definition: '(' def_list ')' { $$ = $2; }
...
...
@@ -1886,24 +1891,18 @@ def_list: def_elem { $$ = makeList1($1); }
| def_list ',' def_elem { $$ = lappend($1, $3); }
;
def_elem:
def_name
'=' def_arg
def_elem:
ColLabel
'=' def_arg
{
$$ = makeNode(DefElem);
$$->defname = $1;
$$->arg = (Node *)$3;
}
|
def_name
|
ColLabel
{
$$ = makeNode(DefElem);
$$->defname = $1;
$$->arg = (Node *)NULL;
}
| DEFAULT '=' def_arg
{
$$ = makeNode(DefElem);
$$->defname = "default";
$$->arg = (Node *)$3;
}
;
def_arg: func_return { $$ = (Node *)$1; }
...
...
@@ -2538,7 +2537,7 @@ RemoveFuncStmt: DROP FUNCTION func_name func_args
}
;
RemoveAggrStmt: DROP AGGREGATE name aggr_argtype
RemoveAggrStmt: DROP AGGREGATE
func_
name aggr_argtype
{
RemoveAggrStmt *n = makeNode(RemoveAggrStmt);
n->aggname = $3;
...
...
@@ -5498,6 +5497,7 @@ TokenId: ABSOLUTE { $$ = "absolute"; }
| PRIOR { $$ = "prior"; }
| PRIVILEGES { $$ = "privileges"; }
| PROCEDURAL { $$ = "procedural"; }
| PROCEDURE { $$ = "procedure"; }
| READ { $$ = "read"; }
| REINDEX { $$ = "reindex"; }
| RELATIVE { $$ = "relative"; }
...
...
@@ -5644,7 +5644,6 @@ ColLabel: ColId { $$ = $1; }
| POSITION { $$ = "position"; }
| PRECISION { $$ = "precision"; }
| PRIMARY { $$ = "primary"; }
| PROCEDURE { $$ = "procedure"; }
| PUBLIC { $$ = "public"; }
| REFERENCES { $$ = "references"; }
| RESET { $$ = "reset"; }
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录