Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
cee82fab
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,发现更多精彩内容 >>
提交
cee82fab
编写于
6月 13, 2001
作者:
M
Michael Meskes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- Synced preproc.y with gram.y.
- Applied bug fix by John Summerfield.
上级
2938eec7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
16 deletion
+43
-16
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+5
-0
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/pgc.l
+2
-2
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+36
-14
未找到文件。
src/interfaces/ecpg/ChangeLog
浏览文件 @
cee82fab
...
...
@@ -1079,5 +1079,10 @@ Fri Jun 1 08:13:25 CEST 2001
- Synced preproc.y with gram.y.
- Synced pgc.l with scan.l.
- Synced keyword.c.
Wed Jun 13 14:39:12 CEST 2001
- Synced preproc.y with gram.y.
- Applied bug fix by John Summerfield.
- Set ecpg version to 2.9.0.
- Set library version to 3.3.0.
src/interfaces/ecpg/preproc/pgc.l
浏览文件 @
cee82fab
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.7
8 2001/04/02 08:17:24
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.7
9 2001/06/13 12:38:58
meskes Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -896,7 +896,7 @@ lex_init(void)
braces_open = 0;
preproc_tos = 0;
yylineno =
0
;
yylineno =
1
;
ifcond = TRUE;
stacked_if_value[preproc_tos].condition = ifcond;
stacked_if_value[preproc_tos].else_branch = FALSE;
...
...
src/interfaces/ecpg/preproc/preproc.y
浏览文件 @
cee82fab
...
...
@@ -337,7 +337,7 @@ make_name(void)
%type <str> constraints_set_mode comment_type comment_cl comment_ag
%type <str> CreateGroupStmt AlterGroupStmt DropGroupStmt key_delete
%type <str> opt_force key_update CreateSchemaStmt PosIntStringConst
%type <str> IntConst PosIntConst
%type <str> IntConst PosIntConst
grantee_list func_type
%type <str> select_limit opt_for_update_clause CheckPointStmt
%type <str> ECPGWhenever ECPGConnect connection_target ECPGOpen
...
...
@@ -852,6 +852,10 @@ VariableShowStmt: SHOW ColId
{
$$ = make_str("show time zone");
}
| SHOW ALL
{
$$ = make_str("show all");
}
| SHOW TRANSACTION ISOLATION LEVEL
{
$$ = make_str("show transaction isolation level");
...
...
@@ -870,6 +874,10 @@ VariableResetStmt: RESET ColId
{
$$ = make_str("reset transaction isolation level");
}
| RESET ALL
{
$$ = make_str("reset all");
}
;
ConstraintsSetStmt: SET CONSTRAINTS constraints_set_list constraints_set_mode
...
...
@@ -1681,11 +1689,11 @@ comment_text: StringConst { $$ = $1; }
/*****************************************************************************
*
* QUERY:
*
GRANT [privileges] ON [relation_name_list] TO [GROUP] grantee
*
GRANT [privileges] ON [TABLE] relation_name_list TO [GROUP] grantee, ...
*
*****************************************************************************/
GrantStmt: GRANT privileges ON opt_table relation_name_list TO grantee opt_with_grant
GrantStmt: GRANT privileges ON opt_table relation_name_list TO grantee
_list
opt_with_grant
{
$$ = cat_str(8, make_str("grant"), $2, make_str("on"), $4, $5, make_str("to"), $7);
}
...
...
@@ -1759,6 +1767,10 @@ grantee: PUBLIC
}
;
grantee_list: grantee { $$ = $1; }
| grantee_list ',' grantee { $$ = cat_str(3, $1, make_str(","), $3); }
;
opt_with_grant: WITH GRANT OPTION
{
mmerror(ET_ERROR, "WITH GRANT OPTION is not supported. Only relation owners can set privileges");
...
...
@@ -1770,11 +1782,11 @@ opt_with_grant: WITH GRANT OPTION
/*****************************************************************************
*
* QUERY:
*
REVOKE [privileges] ON [relation_name] FROM [user]
*
REVOKE privileges ON [TABLE relation_name_list FROM [user], ...
*
*****************************************************************************/
RevokeStmt: REVOKE privileges ON opt_table relation_name_list FROM grantee
RevokeStmt: REVOKE privileges ON opt_table relation_name_list FROM grantee
_list
{
$$ = cat_str(8, make_str("revoke"), $2, make_str("on"), $4, $5, make_str("from"), $7);
}
...
...
@@ -1914,7 +1926,7 @@ func_args_list: func_arg { $$ = $1; }
{ $$ = cat_str(3, $1, make_str(","), $3); }
;
func_arg: opt_arg
Typenam
e
func_arg: opt_arg
func_typ
e
{
/* We can catch over-specified arguments here if we want to,
* but for now better to silently swallow typmod, etc.
...
...
@@ -1922,7 +1934,7 @@ func_arg: opt_arg Typename
*/
$$ = cat2_str($1, $2);
}
|
Typename
|
func_type
{
$$ = $1;
}
...
...
@@ -1944,7 +1956,7 @@ opt_arg: IN { $$ = make_str("in"); }
func_as: StringConst { $$ = $1; }
| StringConst ',' StringConst { $$ = cat_str(3, $1, make_str(","), $3); }
func_return:
Typenam
e
func_return:
func_typ
e
{
/* We can catch over-specified arguments here if we want to,
* but for now better to silently swallow typmod, etc.
...
...
@@ -1954,6 +1966,16 @@ func_return: Typename
}
;
func_type: Typename
{
$$ = $1;
}
| IDENT '.' ColId '%' TYPE_P
{
$$ = cat_str(4, $1, make_str("."), $3, make_str("% type"));
}
;
/*****************************************************************************
*
* QUERY:
...
...
@@ -3869,7 +3891,7 @@ connection_target: database_name opt_server opt_port
/* old style: dbname[@server][:port] */
if (strlen($2) > 0 && *($2) != '@')
{
sprintf(errortext, "
parse error at or near
'%s'", $2);
sprintf(errortext, "
Expected '@', found
'%s'", $2);
mmerror(ET_ERROR, errortext);
}
...
...
@@ -3880,7 +3902,7 @@ connection_target: database_name opt_server opt_port
/* new style: <tcp|unix>:postgresql://server[:port][/dbname] */
if (strncmp($3, "//", strlen("//")) != 0)
{
sprintf(errortext, "
parse error at or near
'%s'", $3);
sprintf(errortext, "
Expected '://', found
'%s'", $3);
mmerror(ET_ERROR, errortext);
}
...
...
@@ -3926,7 +3948,7 @@ db_prefix: ident cvariable
{
if (strcmp($2, "postgresql") != 0 && strcmp($2, "postgres") != 0)
{
sprintf(errortext, "
parse error at or near
'%s'", $2);
sprintf(errortext, "
Expected 'postgresql', found
'%s'", $2);
mmerror(ET_ERROR, errortext);
}
...
...
@@ -3943,7 +3965,7 @@ server: Op server_name
{
if (strcmp($1, "@") != 0 && strcmp($1, "//") != 0)
{
sprintf(errortext, "
parse error at or near
'%s'", $1);
sprintf(errortext, "
Expected '@' or '://', found
'%s'", $1);
mmerror(ET_ERROR, errortext);
}
...
...
@@ -4037,11 +4059,11 @@ char_variable: cvariable
opt_options: Op ColId
{
if (strlen($1) == 0)
mmerror(ET_ERROR, "
parse error
");
mmerror(ET_ERROR, "
incomplete statement
");
if (strcmp($1, "?") != 0)
{
sprintf(errortext, "
parse error at or near %s
", $1);
sprintf(errortext, "
unrecognised token '%s'
", $1);
mmerror(ET_ERROR, errortext);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录