Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
5106aff9
Commit
5106aff9
authored
Dec 02, 2005
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added special handling of CONNECTION variable that is used by ECPG instead of given to the backend.
parent
9322a047
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
13 deletions
+33
-13
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+5
-0
src/interfaces/ecpg/preproc/ecpg_keywords.c
src/interfaces/ecpg/preproc/ecpg_keywords.c
+1
-2
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+27
-11
No files found.
src/interfaces/ecpg/ChangeLog
View file @
5106aff9
...
@@ -1957,6 +1957,11 @@ Wed Nov 30 12:49:13 CET 2005
...
@@ -1957,6 +1957,11 @@ Wed Nov 30 12:49:13 CET 2005
- Made several variables "const char *" instead of "char *" as
- Made several variables "const char *" instead of "char *" as
proposed by Qingqing Zhou <zhouqq@cs.toronto.edu>.
proposed by Qingqing Zhou <zhouqq@cs.toronto.edu>.
- Replaced all strdup() calls by ECPGstrdup().
- Replaced all strdup() calls by ECPGstrdup().
Fri Dec 2 16:00:10 CET 2005
- Added special handling of CONNECTION variable that is used by ECPG
instead of given to the backend.
- Set ecpg library version to 5.2.
- Set ecpg library version to 5.2.
- Set ecpg version to 4.2.1.
- Set ecpg version to 4.2.1.
src/interfaces/ecpg/preproc/ecpg_keywords.c
View file @
5106aff9
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* lexical token lookup for reserved words in postgres embedded SQL
* lexical token lookup for reserved words in postgres embedded SQL
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.3
1 2005/10/15 02:49:47 momjian
Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.3
2 2005/12/02 15:03:57 meskes
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -31,7 +31,6 @@ static ScanKeyword ScanKeywords[] = {
...
@@ -31,7 +31,6 @@ static ScanKeyword ScanKeywords[] = {
{
"call"
,
SQL_CALL
},
{
"call"
,
SQL_CALL
},
{
"cardinality"
,
SQL_CARDINALITY
},
{
"cardinality"
,
SQL_CARDINALITY
},
{
"connect"
,
SQL_CONNECT
},
{
"connect"
,
SQL_CONNECT
},
{
"connection"
,
SQL_CONNECTION
},
{
"continue"
,
SQL_CONTINUE
},
{
"continue"
,
SQL_CONTINUE
},
{
"count"
,
SQL_COUNT
},
{
"count"
,
SQL_COUNT
},
{
"current"
,
SQL_CURRENT
},
{
"current"
,
SQL_CURRENT
},
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
5106aff9
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.31
2 2005/11/27 01:22:23 tgl
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.31
3 2005/12/02 15:03:57 meskes
Exp $ */
/* Copyright comment */
/* Copyright comment */
%{
%{
...
@@ -324,7 +324,7 @@ add_additional_variables(char *name, bool insert)
...
@@ -324,7 +324,7 @@ add_additional_variables(char *name, bool insert)
/* special embedded SQL token */
/* special embedded SQL token */
%token SQL_ALLOCATE SQL_AUTOCOMMIT SQL_BOOL SQL_BREAK
%token SQL_ALLOCATE SQL_AUTOCOMMIT SQL_BOOL SQL_BREAK
SQL_CALL SQL_CARDINALITY SQL_CONNECT
SQL_CONNECTION
SQL_CALL SQL_CARDINALITY SQL_CONNECT
SQL_CONTINUE SQL_COUNT SQL_CURRENT SQL_DATA
SQL_CONTINUE SQL_COUNT SQL_CURRENT SQL_DATA
SQL_DATETIME_INTERVAL_CODE
SQL_DATETIME_INTERVAL_CODE
SQL_DATETIME_INTERVAL_PRECISION SQL_DESCRIBE
SQL_DATETIME_INTERVAL_PRECISION SQL_DESCRIBE
...
@@ -506,7 +506,7 @@ add_additional_variables(char *name, bool insert)
...
@@ -506,7 +506,7 @@ add_additional_variables(char *name, bool insert)
%type <str> opt_instead event RuleActionList opt_using CreateAssertStmt
%type <str> opt_instead event RuleActionList opt_using CreateAssertStmt
%type <str> RuleActionStmtOrEmpty RuleActionMulti func_as reindex_type
%type <str> RuleActionStmtOrEmpty RuleActionMulti func_as reindex_type
%type <str> RuleStmt opt_column oper_argtypes NumConst var_name
%type <str> RuleStmt opt_column oper_argtypes NumConst var_name
%type <str> MathOp RemoveFuncStmt aggr_argtype
%type <str> MathOp RemoveFuncStmt aggr_argtype
ECPGunreserved_con
%type <str> RemoveAggrStmt opt_procedural select_no_parens CreateCastStmt
%type <str> RemoveAggrStmt opt_procedural select_no_parens CreateCastStmt
%type <str> RemoveOperStmt RenameStmt all_Op opt_trusted opt_lancompiler
%type <str> RemoveOperStmt RenameStmt all_Op opt_trusted opt_lancompiler
%type <str> VariableSetStmt var_value zone_value VariableShowStmt
%type <str> VariableSetStmt var_value zone_value VariableShowStmt
...
@@ -537,7 +537,7 @@ add_additional_variables(char *name, bool insert)
...
@@ -537,7 +537,7 @@ add_additional_variables(char *name, bool insert)
%type <str> CreateGroupStmt AlterGroupStmt DropGroupStmt key_delete
%type <str> CreateGroupStmt AlterGroupStmt DropGroupStmt key_delete
%type <str> opt_force key_update CreateSchemaStmt PosIntStringConst
%type <str> opt_force key_update CreateSchemaStmt PosIntStringConst
%type <str> IntConst PosIntConst grantee_list func_type opt_or_replace
%type <str> IntConst PosIntConst grantee_list func_type opt_or_replace
%type <str> select_limit CheckPointStmt
%type <str> select_limit CheckPointStmt
ECPGColId
%type <str> OptSchemaName OptSchemaEltList schema_stmt opt_drop_behavior
%type <str> OptSchemaName OptSchemaEltList schema_stmt opt_drop_behavior
%type <str> handler_name any_name_list any_name opt_as insert_column_list
%type <str> handler_name any_name_list any_name opt_as insert_column_list
%type <str> columnref function_name insert_target_el AllConstVar
%type <str> columnref function_name insert_target_el AllConstVar
...
@@ -1117,7 +1117,7 @@ set_rest: var_name TO var_list_or_default
...
@@ -1117,7 +1117,7 @@ set_rest: var_name TO var_list_or_default
{ $$ = make_str("session authorization default"); }
{ $$ = make_str("session authorization default"); }
;
;
var_name:
ColId
{ $$ = $1; }
var_name:
ECPGColId
{ $$ = $1; }
| var_name '.' ColId { $$ = cat_str(3, $1, make_str("."), $3); }
| var_name '.' ColId { $$ = cat_str(3, $1, make_str("."), $3); }
;
;
...
@@ -5649,9 +5649,9 @@ on_off: ON { $$ = make_str("on"); }
...
@@ -5649,9 +5649,9 @@ on_off: ON { $$ = make_str("on"); }
* set the actual connection, this needs a differnet handling as the other
* set the actual connection, this needs a differnet handling as the other
* set commands
* set commands
*/
*/
ECPGSetConnection: SET
SQL_
CONNECTION TO connection_object { $$ = $4; }
ECPGSetConnection: SET CONNECTION TO connection_object { $$ = $4; }
| SET
SQL_
CONNECTION '=' connection_object { $$ = $4; }
| SET CONNECTION '=' connection_object { $$ = $4; }
| SET
SQL_
CONNECTION connection_object { $$ = $3; }
| SET CONNECTION connection_object { $$ = $3; }
;
;
/*
/*
...
@@ -5936,6 +5936,14 @@ symbol: ColLabel { $$ = $1; }
...
@@ -5936,6 +5936,14 @@ symbol: ColLabel { $$ = $1; }
* is chosen in part to make keywords acceptable as names wherever possible.
* is chosen in part to make keywords acceptable as names wherever possible.
*/
*/
ECPGColId:ident { $$ = $1; }
| ECPGunreserved_interval { $$ = $1; }
| ECPGunreserved_con { $$ = $1; }
| col_name_keyword { $$ = $1; }
| ECPGKeywords { $$ = $1; }
| ECPGCKeywords { $$ = $1; }
| CHAR_P { $$ = make_str("char"); }
;
/* Column identifier --- names that can be column, table, etc names.
/* Column identifier --- names that can be column, table, etc names.
*/
*/
ColId: ident { $$ = $1; }
ColId: ident { $$ = $1; }
...
@@ -6024,7 +6032,15 @@ ECPGunreserved_interval: DAY_P { $$ = make_str("day"); }
...
@@ -6024,7 +6032,15 @@ ECPGunreserved_interval: DAY_P { $$ = make_str("day"); }
| YEAR_P { $$ = make_str("year"); }
| YEAR_P { $$ = make_str("year"); }
;
;
ECPGunreserved: ABORT_P { $$ = make_str("abort"); }
/* The following symbol must be excluded from var_name but still included in ColId
to enable ecpg special postgresql variables with this name:
CONNECTION
*/
ECPGunreserved: ECPGunreserved_con { $$ = $1; }
| CONNECTION { $$ = make_str("connection"); }
;
ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); }
| ABSOLUTE_P { $$ = make_str("absolute"); }
| ABSOLUTE_P { $$ = make_str("absolute"); }
| ACCESS { $$ = make_str("access"); }
| ACCESS { $$ = make_str("access"); }
| ACTION { $$ = make_str("action"); }
| ACTION { $$ = make_str("action"); }
...
@@ -6052,7 +6068,7 @@ ECPGunreserved: ABORT_P { $$ = make_str("abort"); }
...
@@ -6052,7 +6068,7 @@ ECPGunreserved: ABORT_P { $$ = make_str("abort"); }
| COMMENT { $$ = make_str("comment"); }
| COMMENT { $$ = make_str("comment"); }
| COMMIT { $$ = make_str("commit"); }
| COMMIT { $$ = make_str("commit"); }
| COMMITTED { $$ = make_str("committed"); }
| COMMITTED { $$ = make_str("committed"); }
| CONNECTION { $$ = make_str("connection"); }
/* | CONNECTION { $$ = make_str("connection"); }*/
| CONSTRAINTS { $$ = make_str("constraints"); }
| CONSTRAINTS { $$ = make_str("constraints"); }
| CONVERSION_P { $$ = make_str("conversion"); }
| CONVERSION_P { $$ = make_str("conversion"); }
| COPY { $$ = make_str("copy"); }
| COPY { $$ = make_str("copy"); }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment