|
1 |
| -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.312 2005/11/27 01:22:23 tgl Exp $ */ |
| 1 | +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.313 2005/12/02 15:03:57 meskes Exp $ */ |
2 | 2 |
|
3 | 3 | /* Copyright comment */
|
4 | 4 | %{
|
@@ -324,7 +324,7 @@ add_additional_variables(char *name, bool insert)
|
324 | 324 |
|
325 | 325 | /* special embedded SQL token */
|
326 | 326 | %token SQL_ALLOCATE SQL_AUTOCOMMIT SQL_BOOL SQL_BREAK
|
327 |
| - SQL_CALL SQL_CARDINALITY SQL_CONNECT SQL_CONNECTION |
| 327 | + SQL_CALL SQL_CARDINALITY SQL_CONNECT |
328 | 328 | SQL_CONTINUE SQL_COUNT SQL_CURRENT SQL_DATA
|
329 | 329 | SQL_DATETIME_INTERVAL_CODE
|
330 | 330 | SQL_DATETIME_INTERVAL_PRECISION SQL_DESCRIBE
|
@@ -506,7 +506,7 @@ add_additional_variables(char *name, bool insert)
|
506 | 506 | %type <str> opt_instead event RuleActionList opt_using CreateAssertStmt
|
507 | 507 | %type <str> RuleActionStmtOrEmpty RuleActionMulti func_as reindex_type
|
508 | 508 | %type <str> RuleStmt opt_column oper_argtypes NumConst var_name
|
509 |
| -%type <str> MathOp RemoveFuncStmt aggr_argtype |
| 509 | +%type <str> MathOp RemoveFuncStmt aggr_argtype ECPGunreserved_con |
510 | 510 | %type <str> RemoveAggrStmt opt_procedural select_no_parens CreateCastStmt
|
511 | 511 | %type <str> RemoveOperStmt RenameStmt all_Op opt_trusted opt_lancompiler
|
512 | 512 | %type <str> VariableSetStmt var_value zone_value VariableShowStmt
|
@@ -537,7 +537,7 @@ add_additional_variables(char *name, bool insert)
|
537 | 537 | %type <str> CreateGroupStmt AlterGroupStmt DropGroupStmt key_delete
|
538 | 538 | %type <str> opt_force key_update CreateSchemaStmt PosIntStringConst
|
539 | 539 | %type <str> IntConst PosIntConst grantee_list func_type opt_or_replace
|
540 |
| -%type <str> select_limit CheckPointStmt |
| 540 | +%type <str> select_limit CheckPointStmt ECPGColId |
541 | 541 | %type <str> OptSchemaName OptSchemaEltList schema_stmt opt_drop_behavior
|
542 | 542 | %type <str> handler_name any_name_list any_name opt_as insert_column_list
|
543 | 543 | %type <str> columnref function_name insert_target_el AllConstVar
|
@@ -1117,7 +1117,7 @@ set_rest: var_name TO var_list_or_default
|
1117 | 1117 | { $$ = make_str("session authorization default"); }
|
1118 | 1118 | ;
|
1119 | 1119 |
|
1120 |
| -var_name: ColId { $$ = $1; } |
| 1120 | +var_name: ECPGColId { $$ = $1; } |
1121 | 1121 | | var_name '.' ColId { $$ = cat_str(3, $1, make_str("."), $3); }
|
1122 | 1122 | ;
|
1123 | 1123 |
|
@@ -5649,9 +5649,9 @@ on_off: ON { $$ = make_str("on"); }
|
5649 | 5649 | * set the actual connection, this needs a differnet handling as the other
|
5650 | 5650 | * set commands
|
5651 | 5651 | */
|
5652 |
| -ECPGSetConnection: SET SQL_CONNECTION TO connection_object { $$ = $4; } |
5653 |
| - | SET SQL_CONNECTION '=' connection_object { $$ = $4; } |
5654 |
| - | SET SQL_CONNECTION connection_object { $$ = $3; } |
| 5652 | +ECPGSetConnection: SET CONNECTION TO connection_object { $$ = $4; } |
| 5653 | + | SET CONNECTION '=' connection_object { $$ = $4; } |
| 5654 | + | SET CONNECTION connection_object { $$ = $3; } |
5655 | 5655 | ;
|
5656 | 5656 |
|
5657 | 5657 | /*
|
@@ -5936,6 +5936,14 @@ symbol: ColLabel { $$ = $1; }
|
5936 | 5936 | * is chosen in part to make keywords acceptable as names wherever possible.
|
5937 | 5937 | */
|
5938 | 5938 |
|
| 5939 | +ECPGColId:ident { $$ = $1; } |
| 5940 | + | ECPGunreserved_interval { $$ = $1; } |
| 5941 | + | ECPGunreserved_con { $$ = $1; } |
| 5942 | + | col_name_keyword { $$ = $1; } |
| 5943 | + | ECPGKeywords { $$ = $1; } |
| 5944 | + | ECPGCKeywords { $$ = $1; } |
| 5945 | + | CHAR_P { $$ = make_str("char"); } |
| 5946 | + ; |
5939 | 5947 | /* Column identifier --- names that can be column, table, etc names.
|
5940 | 5948 | */
|
5941 | 5949 | ColId: ident { $$ = $1; }
|
@@ -6016,15 +6024,23 @@ ECPGCKeywords: S_AUTO { $$ = make_str("auto"); }
|
6016 | 6024 | */
|
6017 | 6025 | unreserved_keyword: ECPGunreserved_interval | ECPGunreserved;
|
6018 | 6026 |
|
6019 |
| -ECPGunreserved_interval: DAY_P { $$ = make_str("day"); } |
| 6027 | +ECPGunreserved_interval: DAY_P { $$ = make_str("day"); } |
6020 | 6028 | | HOUR_P { $$ = make_str("hour"); }
|
6021 | 6029 | | MINUTE_P { $$ = make_str("minute"); }
|
6022 | 6030 | | MONTH_P { $$ = make_str("month"); }
|
6023 | 6031 | | SECOND_P { $$ = make_str("second"); }
|
6024 | 6032 | | YEAR_P { $$ = make_str("year"); }
|
6025 | 6033 | ;
|
6026 | 6034 |
|
6027 |
| -ECPGunreserved: ABORT_P { $$ = make_str("abort"); } |
| 6035 | +/* The following symbol must be excluded from var_name but still included in ColId |
| 6036 | + to enable ecpg special postgresql variables with this name: |
| 6037 | + CONNECTION |
| 6038 | + */ |
| 6039 | +ECPGunreserved: ECPGunreserved_con { $$ = $1; } |
| 6040 | + | CONNECTION { $$ = make_str("connection"); } |
| 6041 | + ; |
| 6042 | + |
| 6043 | +ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); } |
6028 | 6044 | | ABSOLUTE_P { $$ = make_str("absolute"); }
|
6029 | 6045 | | ACCESS { $$ = make_str("access"); }
|
6030 | 6046 | | ACTION { $$ = make_str("action"); }
|
@@ -6052,7 +6068,7 @@ ECPGunreserved: ABORT_P { $$ = make_str("abort"); }
|
6052 | 6068 | | COMMENT { $$ = make_str("comment"); }
|
6053 | 6069 | | COMMIT { $$ = make_str("commit"); }
|
6054 | 6070 | | COMMITTED { $$ = make_str("committed"); }
|
6055 |
| - | CONNECTION { $$ = make_str("connection"); } |
| 6071 | +/* | CONNECTION { $$ = make_str("connection"); }*/ |
6056 | 6072 | | CONSTRAINTS { $$ = make_str("constraints"); }
|
6057 | 6073 | | CONVERSION_P { $$ = make_str("conversion"); }
|
6058 | 6074 | | COPY { $$ = make_str("copy"); }
|
|
0 commit comments