From cfd184371e8948c9d856db124420354131440ef8 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Fri, 1 Jun 2001 06:23:19 +0000 Subject: [PATCH] - Synced preproc.y with gram.y. - Synced pgc.l with scan.l. - Synced keyword.c. - Set ecpg version to 2.9.0. - Set library version to 3.3.0. --- src/interfaces/ecpg/ChangeLog | 8 ++++++++ src/interfaces/ecpg/preproc/keywords.c | 3 ++- src/interfaces/ecpg/preproc/preproc.y | 31 ++++++++++++++++++++++++------- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog index 4516b8e543..ddb2e2f981 100644 --- a/src/interfaces/ecpg/ChangeLog +++ b/src/interfaces/ecpg/ChangeLog @@ -1073,3 +1073,11 @@ Thu Apr 5 10:11:35 CEST 2001 - Fixed long long problem. - Set ecpg version to 2.8.0. - Set library version to 3.2.0. + +Fri Jun 1 08:13:25 CEST 2001 + + - Synced preproc.y with gram.y. + - Synced pgc.l with scan.l. + - Synced keyword.c. + - Set ecpg version to 2.9.0. + - Set library version to 3.3.0. diff --git a/src/interfaces/ecpg/preproc/keywords.c b/src/interfaces/ecpg/preproc/keywords.c index c03880f497..d7ee1d3455 100644 --- a/src/interfaces/ecpg/preproc/keywords.c +++ b/src/interfaces/ecpg/preproc/keywords.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.40 2001/05/07 00:43:26 tgl Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.41 2001/06/01 06:23:19 meskes Exp $ * *------------------------------------------------------------------------- */ @@ -44,6 +44,7 @@ static ScanKeyword ScanKeywords[] = { {"as", AS}, {"asc", ASC}, {"at", AT}, + {"authorization", AUTHORIZATION}, {"backward", BACKWARD}, {"before", BEFORE}, {"begin", BEGIN_TRANS}, diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index 91708bd91f..673194db3a 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -172,7 +172,7 @@ make_name(void) %token TYPECAST /* Keywords (in SQL92 reserved words) */ -%token ABSOLUTE, ACTION, ADD, ALL, ALTER, AND, ANY, AS, ASC, +%token ABSOLUTE, ACTION, ADD, ALL, ALTER, AND, ANY, AS, ASC, AT, AUTHORIZATION, BEGIN_TRANS, BETWEEN, BOTH, BY, CASCADE, CASE, CAST, CHAIN, CHAR, CHARACTER, CHARACTERISTICS, CHECK, CLOSE, @@ -293,7 +293,7 @@ make_name(void) %type row_expr row_descriptor row_list ConstDatetime opt_chain %type SelectStmt into_clause OptTemp ConstraintAttributeSpec %type opt_table opt_all sort_clause sortby_list ConstraintAttr -%type sortby OptUseOp relation_name_list name_list +%type sortby OptUseOp relation_name_list name_list ColId_or_Sconst %type group_clause having_clause from_clause opt_distinct %type join_outer where_clause relation_expr sub_type opt_arg %type opt_column_list insert_rest InsertStmt OptimizableStmt @@ -802,6 +802,10 @@ VariableSetStmt: SET ColId TO var_value { $$ = cat2_str(make_str("set names"), $3); } + | SET SESSION AUTHORIZATION ColId_or_Sconst + { + $$ = cat2_str(make_str("set session authorization"), $4); + } ; opt_level: READ COMMITTED { $$ = make_str("read committed"); } @@ -836,6 +840,10 @@ opt_encoding: StringConst { $$ = $1; } | /*EMPTY*/ { $$ = EMPTY; } ; +ColId_or_Sconst: ColId { $$ = $1; } + | SCONST { $$ = $1; } + ; + VariableShowStmt: SHOW ColId { $$ = cat2_str(make_str("show"), $2); @@ -1677,9 +1685,9 @@ comment_text: StringConst { $$ = $1; } * *****************************************************************************/ -GrantStmt: GRANT privileges ON relation_name_list TO grantee opt_with_grant +GrantStmt: GRANT privileges ON opt_table relation_name_list TO grantee opt_with_grant { - $$ = cat_str(7, make_str("grant"), $2, make_str("on"), $4, make_str("to"), $6); + $$ = cat_str(8, make_str("grant"), $2, make_str("on"), $4, $5, make_str("to"), $7); } ; @@ -1727,6 +1735,14 @@ operation: SELECT { $$ = make_str("rule"); } + | REFERENCES + { + $$ = make_str("references"); + } + | TRIGGER + { + $$ = make_str("trigger"); + } ; grantee: PUBLIC @@ -1758,9 +1774,9 @@ opt_with_grant: WITH GRANT OPTION * *****************************************************************************/ -RevokeStmt: REVOKE privileges ON relation_name_list FROM grantee +RevokeStmt: REVOKE privileges ON opt_table relation_name_list FROM grantee { - $$ = cat_str(7, make_str("revoke"), $2, make_str("on"), $4, make_str("from"), $6); + $$ = cat_str(8, make_str("revoke"), $2, make_str("on"), $4, $5, make_str("from"), $7); } ; @@ -4939,6 +4955,7 @@ TokenId: ABSOLUTE { $$ = make_str("absolute"); } | AGGREGATE { $$ = make_str("aggregate"); } | ALTER { $$ = make_str("alter"); } | AT { $$ = make_str("at"); } + | AUTHORIZATION { $$ = make_str("authorization"); } | BACKWARD { $$ = make_str("backward"); } | BEFORE { $$ = make_str("before"); } | BEGIN_TRANS { $$ = make_str("begin"); } @@ -5027,7 +5044,7 @@ TokenId: ABSOLUTE { $$ = make_str("absolute"); } | SHARE { $$ = make_str("share"); } | START { $$ = make_str("start"); } | STATEMENT { $$ = make_str("statement"); } - | STATISTICS { $$ = make_str("statistics"); } + | STATISTICS { $$ = make_str("statistics"); } | STDIN { $$ = make_str("stdin"); } | STDOUT { $$ = make_str("stdout"); } | SYSID { $$ = make_str("sysid"); } -- 2.11.0