Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
5ca4dfc7
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,发现更多精彩内容 >>
提交
5ca4dfc7
编写于
3月 15, 2011
作者:
R
Robert Haas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove 13 keywords that are used only for ROLE options.
Review by Tom Lane.
上级
01c1a12a
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
58 addition
and
87 deletion
+58
-87
src/backend/parser/gram.y
src/backend/parser/gram.y
+58
-74
src/include/parser/kwlist.h
src/include/parser/kwlist.h
+0
-13
未找到文件。
src/backend/parser/gram.y
浏览文件 @
5ca4dfc7
...
...
@@ -489,8 +489,8 @@ static void SplitColQualList(List *qualList,
CHARACTER CHARACTERISTICS CHECK CHECKPOINT CLASS CLOSE
CLUSTER COALESCE COLLATE COLLATION COLUMN COMMENT COMMENTS COMMIT
COMMITTED CONCURRENTLY CONFIGURATION CONNECTION CONSTRAINT CONSTRAINTS
CONTENT_P CONTINUE_P CONVERSION_P COPY COST CREATE
CREATEDB
CR
EATEROLE CREATEUSER CR
OSS CSV CURRENT_P
CONTENT_P CONTINUE_P CONVERSION_P COPY COST CREATE
CROSS CSV CURRENT_P
CURRENT_CATALOG CURRENT_DATE CURRENT_ROLE CURRENT_SCHEMA
CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURSOR CYCLE
...
...
@@ -520,13 +520,12 @@ static void SplitColQualList(List *qualList,
LABEL LANGUAGE LARGE_P LAST_P LC_COLLATE_P LC_CTYPE_P LEADING
LEAST LEFT LEVEL LIKE LIMIT LISTEN LOAD LOCAL LOCALTIME LOCALTIMESTAMP
LOCATION LOCK_P
LOGIN_P
LOCATION LOCK_P
MAPPING MATCH MAXVALUE MINUTE_P MINVALUE MODE MONTH_P MOVE
NAME_P NAMES NATIONAL NATURAL NCHAR NEXT NO NOCREATEDB
NOCREATEROLE NOCREATEUSER NOINHERIT NOLOGIN_P NONE NOREPLICATION_P
NOSUPERUSER NOT NOTHING NOTIFY NOTNULL NOWAIT NULL_P NULLIF
NAME_P NAMES NATIONAL NATURAL NCHAR NEXT NO NONE
NOT NOTHING NOTIFY NOTNULL NOWAIT NULL_P NULLIF
NULLS_P NUMERIC
OBJECT_P OF OFF OFFSET OIDS ON ONLY OPERATOR OPTION OPTIONS OR
...
...
@@ -539,14 +538,14 @@ static void SplitColQualList(List *qualList,
QUOTE
RANGE READ REAL REASSIGN RECHECK RECURSIVE REF REFERENCES REINDEX
RELATIVE_P RELEASE RENAME REPEATABLE REPLACE REPLICA
REPLICATION_P
RELATIVE_P RELEASE RENAME REPEATABLE REPLACE REPLICA
RESET RESTART RESTRICT RETURNING RETURNS REVOKE RIGHT ROLE ROLLBACK
ROW ROWS RULE
SAVEPOINT SCHEMA SCROLL SEARCH SECOND_P SECURITY SELECT SEQUENCE SEQUENCES
SERIALIZABLE SERVER SESSION SESSION_USER SET SETOF SHARE
SHOW SIMILAR SIMPLE SMALLINT SOME STABLE STANDALONE_P START STATEMENT
STATISTICS STDIN STDOUT STORAGE STRICT_P STRIP_P SUBSTRING
SUPERUSER_P
STATISTICS STDIN STDOUT STORAGE STRICT_P STRIP_P SUBSTRING
SYMMETRIC SYSID SYSTEM_P
TABLE TABLES TABLESPACE TEMP TEMPLATE TEMPORARY TEXT_P THEN TIME TIMESTAMP
...
...
@@ -838,75 +837,73 @@ AlterOptRoleElem:
$$ = makeDefElem("unencryptedPassword",
(Node *)makeString($3));
}
| SUPERUSER_P
{
$$ = makeDefElem("superuser", (Node *)makeInteger(TRUE));
}
| NOSUPERUSER
{
$$ = makeDefElem("superuser", (Node *)makeInteger(FALSE));
}
| INHERIT
{
$$ = makeDefElem("inherit", (Node *)makeInteger(TRUE));
}
| NOINHERIT
{
$$ = makeDefElem("inherit", (Node *)makeInteger(FALSE));
}
| CREATEDB
| CONNECTION LIMIT SignedIconst
{
$$ = makeDefElem("c
reatedb", (Node *)makeInteger(TRUE
));
$$ = makeDefElem("c
onnectionlimit", (Node *)makeInteger($3
));
}
|
NOCREATEDB
|
VALID UNTIL Sconst
{
$$ = makeDefElem("
createdb", (Node *)makeInteger(FALSE
));
$$ = makeDefElem("
validUntil", (Node *)makeString($3
));
}
| CREATEROLE
/* Supported but not documented for roles, for use by ALTER GROUP. */
| USER name_list
{
$$ = makeDefElem("
createrole", (Node *)makeInteger(TRUE)
);
$$ = makeDefElem("
rolemembers", (Node *)$2
);
}
|
NOCREATEROLE
|
IDENT
{
$$ = makeDefElem("createrole", (Node *)makeInteger(FALSE));
}
| CREATEUSER
/*
* We handle identifiers that aren't parser keywords with
* the following special-case codes, to avoid bloating the
* size of the main parser.
*/
if (strcmp($1, "superuser") == 0)
$$ = makeDefElem("superuser", (Node *)makeInteger(TRUE));
else if (strcmp($1, "nosuperuser") == 0)
$$ = makeDefElem("superuser", (Node *)makeInteger(FALSE));
else if (strcmp($1, "createuser") == 0)
{
/* For backwards compatibility, synonym for SUPERUSER */
$$ = makeDefElem("superuser", (Node *)makeInteger(TRUE));
}
| NOCREATEUSER
else if (strcmp($1, "nocreateuser") == 0)
{
/* For backwards compatibility, synonym for SUPERUSER */
$$ = makeDefElem("superuser", (Node *)makeInteger(FALSE));
}
| LOGIN_P
{
$$ = makeDefElem("canlogin", (Node *)makeInteger(TRUE));
}
| NOLOGIN_P
{
$$ = makeDefElem("canlogin", (Node *)makeInteger(FALSE));
}
| REPLICATION_P
{
else if (strcmp($1, "createrole") == 0)
$$ = makeDefElem("createrole", (Node *)makeInteger(TRUE));
else if (strcmp($1, "nocreaterole") == 0)
$$ = makeDefElem("createrole", (Node *)makeInteger(FALSE));
else if (strcmp($1, "replication") == 0)
$$ = makeDefElem("isreplication", (Node *)makeInteger(TRUE));
}
| NOREPLICATION_P
{
else if (strcmp($1, "noreplication") == 0)
$$ = makeDefElem("isreplication", (Node *)makeInteger(FALSE));
}
| CONNECTION LIMIT SignedIconst
{
$$ = makeDefElem("connectionlimit", (Node *)makeInteger($3));
}
| VALID UNTIL Sconst
else if (strcmp($1, "createdb") == 0)
$$ = makeDefElem("createdb", (Node *)makeInteger(TRUE));
else if (strcmp($1, "nocreatedb") == 0)
$$ = makeDefElem("createdb", (Node *)makeInteger(FALSE));
else if (strcmp($1, "login") == 0)
$$ = makeDefElem("canlogin", (Node *)makeInteger(TRUE));
else if (strcmp($1, "nologin") == 0)
$$ = makeDefElem("canlogin", (Node *)makeInteger(FALSE));
else if (strcmp($1, "noinherit") == 0)
{
$$ = makeDefElem("validUntil", (Node *)makeString($3));
/*
* Note that INHERIT is a keyword, so it's handled by main parser, but
* NOINHERIT is handled here.
*/
$$ = makeDefElem("inherit", (Node *)makeInteger(FALSE));
}
/* Supported but not documented for roles, for use by ALTER GROUP. */
| USER name_list
{
$$ = makeDefElem("rolemembers", (Node *)$2);
else
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("unrecognized role option \"%s\"", $1),
parser_errposition(@1)));
}
;
...
...
@@ -11853,9 +11850,6 @@ unreserved_keyword:
| CONVERSION_P
| COPY
| COST
| CREATEDB
| CREATEROLE
| CREATEUSER
| CSV
| CURRENT_P
| CURSOR
...
...
@@ -11935,7 +11929,6 @@ unreserved_keyword:
| LOCAL
| LOCATION
| LOCK_P
| LOGIN_P
| MAPPING
| MATCH
| MAXVALUE
...
...
@@ -11948,13 +11941,6 @@ unreserved_keyword:
| NAMES
| NEXT
| NO
| NOCREATEDB
| NOCREATEROLE
| NOCREATEUSER
| NOINHERIT
| NOLOGIN_P
| NOREPLICATION_P
| NOSUPERUSER
| NOTHING
| NOTIFY
| NOWAIT
...
...
@@ -11996,7 +11982,6 @@ unreserved_keyword:
| REPEATABLE
| REPLACE
| REPLICA
| REPLICATION_P
| RESET
| RESTART
| RESTRICT
...
...
@@ -12031,7 +12016,6 @@ unreserved_keyword:
| STORAGE
| STRICT_P
| STRIP_P
| SUPERUSER_P
| SYSID
| SYSTEM_P
| TABLES
...
...
src/include/parser/kwlist.h
浏览文件 @
5ca4dfc7
...
...
@@ -96,9 +96,6 @@ PG_KEYWORD("conversion", CONVERSION_P, UNRESERVED_KEYWORD)
PG_KEYWORD
(
"copy"
,
COPY
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"cost"
,
COST
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"create"
,
CREATE
,
RESERVED_KEYWORD
)
PG_KEYWORD
(
"createdb"
,
CREATEDB
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"createrole"
,
CREATEROLE
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"createuser"
,
CREATEUSER
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"cross"
,
CROSS
,
TYPE_FUNC_NAME_KEYWORD
)
PG_KEYWORD
(
"csv"
,
CSV
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"current"
,
CURRENT_P
,
UNRESERVED_KEYWORD
)
...
...
@@ -230,7 +227,6 @@ PG_KEYWORD("localtime", LOCALTIME, RESERVED_KEYWORD)
PG_KEYWORD
(
"localtimestamp"
,
LOCALTIMESTAMP
,
RESERVED_KEYWORD
)
PG_KEYWORD
(
"location"
,
LOCATION
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"lock"
,
LOCK_P
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"login"
,
LOGIN_P
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"mapping"
,
MAPPING
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"match"
,
MATCH
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"maxvalue"
,
MAXVALUE
,
UNRESERVED_KEYWORD
)
...
...
@@ -246,14 +242,7 @@ PG_KEYWORD("natural", NATURAL, TYPE_FUNC_NAME_KEYWORD)
PG_KEYWORD
(
"nchar"
,
NCHAR
,
COL_NAME_KEYWORD
)
PG_KEYWORD
(
"next"
,
NEXT
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"no"
,
NO
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"nocreatedb"
,
NOCREATEDB
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"nocreaterole"
,
NOCREATEROLE
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"nocreateuser"
,
NOCREATEUSER
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"noinherit"
,
NOINHERIT
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"nologin"
,
NOLOGIN_P
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"none"
,
NONE
,
COL_NAME_KEYWORD
)
PG_KEYWORD
(
"noreplication"
,
NOREPLICATION_P
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"nosuperuser"
,
NOSUPERUSER
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"not"
,
NOT
,
RESERVED_KEYWORD
)
PG_KEYWORD
(
"nothing"
,
NOTHING
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"notify"
,
NOTIFY
,
UNRESERVED_KEYWORD
)
...
...
@@ -316,7 +305,6 @@ PG_KEYWORD("rename", RENAME, UNRESERVED_KEYWORD)
PG_KEYWORD
(
"repeatable"
,
REPEATABLE
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"replace"
,
REPLACE
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"replica"
,
REPLICA
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"replication"
,
REPLICATION_P
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"reset"
,
RESET
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"restart"
,
RESTART
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"restrict"
,
RESTRICT
,
UNRESERVED_KEYWORD
)
...
...
@@ -361,7 +349,6 @@ PG_KEYWORD("storage", STORAGE, UNRESERVED_KEYWORD)
PG_KEYWORD
(
"strict"
,
STRICT_P
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"strip"
,
STRIP_P
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"substring"
,
SUBSTRING
,
COL_NAME_KEYWORD
)
PG_KEYWORD
(
"superuser"
,
SUPERUSER_P
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"symmetric"
,
SYMMETRIC
,
RESERVED_KEYWORD
)
PG_KEYWORD
(
"sysid"
,
SYSID
,
UNRESERVED_KEYWORD
)
PG_KEYWORD
(
"system"
,
SYSTEM_P
,
UNRESERVED_KEYWORD
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录