8000 Synced yet again. · commandprompt/postgres@0e25360 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0e25360

Browse files
author
Michael Meskes
committed
Synced yet again.
Deactivated backend prepare/execute/deallocate for the time being.
1 parent d28ec4f commit 0e25360

File tree

3 files changed

+46
-51
lines changed

3 files changed

+46
-51
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,14 @@ Sun Sep 1 11:13:04 CEST 2002
12961296
Wed Sep 11 10:43:17 CEST 2002
12971297

12981298
- Synced preproc.y with gram.y.
1299+
1300+
1301+
Fri Sep 20 07:57:42 CEST 2002
1302+
1303+
- Synced preproc.y with gram.y.
1304+
- Synced keywords.c.
1305+
- Deactivated backend functions PREPARE, EXECUTE and DEALLOCATE for
1306+
the time being.
12991307
- Set ecpg version to 2.10.0.
13001308
- Set library version to 3.4.0.
13011309

src/interfaces/ecpg/preproc/keywords.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.50.2.4 2002/09/01 09:31:58 meskes Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.50.2.5 2002/09/20 06:19:07 meskes Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -145,6 +145,7 @@ static ScanKeyword ScanKeywords[] = {
145145
{"ilike", ILIKE},
146146
{"immediate", IMMEDIATE},
147147
{"immutable", IMMUTABLE},
148+
{"implicit", IMPLICIT_P},
148149
{"in", IN_P},
149150
{"increment", INCREMENT},
150151
{"index", INDEX},

src/interfaces/ecpg/preproc/preproc.y

Lines changed: 36 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.190.2.6 2002/09/11 08:50:29 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.190.2.7 2002/09/20 06:19:07 meskes Exp $ */
22

33
/* Copyright comment */
44
%{
@@ -203,7 +203,7 @@ make_name(void)
203203
GET GLOBAL GRANT GROUP_P
204204
HANDLER HAVING HOUR_P
205205

206-
ILIKE IMMEDIATE IMMUTABLE IN_P INCREMENT INDEX INHERITS
206+
ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IN_P INCREMENT INDEX INHERITS
207207
INITIALLY INNER_P INOUT INPUT INSENSITIVE INSERT INSTEAD INT
208208
INTEGER INTERSECT INTERVAL INTO INVOKER IS ISNULL ISOLATION
209209

@@ -289,8 +289,8 @@ make_name(void)
289289
%type <str> comment_text ConstraintDeferrabilitySpec TableElementList
290290
%type <str> key_match ColLabel SpecialRuleRelation ColId columnDef
291291
%type <str> ColConstraint ColConstraintElem drop_type Bconst
292-
%type <str> TableConstraint OptTableElementList Xconst prep_type_clause
293-
%type <str> ConstraintElem key_actions ColQualList type_name PrepareStmt
292+
%type <str> TableConstraint OptTableElementList Xconst
293+
%type <str> ConstraintElem key_actions ColQualList type_name
294294
%type <str> target_list target_el update_target_list alias_clause
295295
%type <str> update_target_el opt_id qualified_name database_name
296296
%type <str> access_method attr_name index_name name func_name
@@ -301,7 +301,7 @@ make_name(void)
301301
%type <str> trim_list in_expr substr_for attrs TableFuncElement
302302
%type <str> Typename SimpleTypename Numeric opt_float opt_numeric
303303
%type <str> opt_decimal Character character opt_varying opt_charset
304-
%type <str> opt_collate opt_timezone opt_interval table_ref DeallocateStmt
304+
%type <str> opt_collate opt_timezone opt_interval table_ref
305305
%type <str> row_descriptor row_list ConstDatetime trans_options
306306
%type <str> SelectStmt into_clause OptTemp ConstraintAttributeSpec
307307
%type <str> opt_table opt_all sort_clause sortby_list ConstraintAttr
@@ -322,7 +322,7 @@ make_name(void)
322322
%type <str> def_elem def_list definition DefineStmt select_with_parens
323323
%type <str> opt_instead event RuleActionList opt_using CreateAssertStmt
324324
%type <str> RuleActionStmtOrEmpty RuleActionMulti func_as reindex_type
325-
%type <str> RuleStmt opt_column opt_name oper_argtypes NumConst ExecuteStmt
325+
%type <str> RuleStmt opt_column opt_name oper_argtypes NumConst
326326
%type <str> MathOp RemoveFuncStmt aggr_argtype for_update_clause
327327
%type <str> RemoveAggrStmt opt_procedural select_no_parens CreateCastStmt
328328
%type <str> RemoveOperStmt RenameStmt all_Op opt_Trusted opt_lancompiler
@@ -362,13 +362,13 @@ make_name(void)
362362
%type <str> CreateFunctionStmt createfunc_opt_list func_table
363363
%type <str> DropUserStmt copy_from copy_opt_list opt_mode copy_opt_item
364364
%type <str> opt_oids TableLikeClause key_action opt_definition
365-
%type <str> opt_assignment row r_expr qual_Op qual_all_Op opt_default
365+
%type <str> cast_context row r_expr qual_Op qual_all_Op opt_default
366366
%type <str> CreateConversionStmt any_operator opclass_item_list
367-
%type <str> iso_level convert_list prep_type_list
367+
%type <str> iso_level convert_list
368368
%type <str> convert_args type_list CharacterWithLength ConstCharacter
369369
%type <str> CharacterWithoutLength BitWithLength BitWithoutLength
370-
%type <str> ConstBit GenericType TableFuncElementList execute_param_clause
371-
%type <str> execute_param_list opt_sort_clause
370+
%type <str> ConstBit GenericType TableFuncElementList
371+
%type <str> opt_sort_clause
372372

373373
%type <str> ECPGWhenever ECPGConnect connection_target ECPGOpen
374374
%type <str> indicator ECPGExecute ECPGPrepare opt_ecpg_using ecpg_into
@@ -456,7 +456,7 @@ stmt: AlterDatabaseSetStmt { output_statement($1, 0, connection); }
456456
| CreateTrigStmt { output_statement($1, 0, connection); }
457457
| CreateUserStmt { output_statement($1, 0, connection); }
458458
| ClusterStmt { output_statement($1, 0, connection); }
459-
| DeallocateStmt { output_statement($1, 0, connection); }
459+
/*| DeallocateStmt { output_statement($1, 0, connection); }*/
460460
| DefineStmt { output_statement($1, 0, connection); }
461461
| DropStmt { output_statement($1, 0, connection); }
462462
| TruncateStmt { output_statement($1, 0, connection); }
@@ -468,16 +468,15 @@ stmt: AlterDatabaseSetStmt { output_statement($1, 0, connection); }
468468
| DropTrigStmt { output_statement($1, 0, connection); }
469469
| DropRuleStmt { output_statement($1, 0, connection); }
470470
| DropUserStmt { output_statement($1, 0, connection); }
471-
| ExplainStmt { output_statement($1, 0, connection); }
472-
| ExecuteStmt { output_statement($1, 0, connection); }
471+
| ExplainStmt { output_statement($1, 0, connection); }/* | ExecuteStmt { output_statement($1, 0, connection); }*/
473472
| FetchStmt { output_statement($1, 1, connection); }
474473
| GrantStmt { output_statement($1, 0, connection); }
475474
| IndexStmt { output_statement($1, 0, connection); }
476475
| ListenStmt { output_statement($1, 0, connection); }
477476
| UnlistenStmt { output_statement($1, 0, connection); }
478477
| LockStmt { output_statement($1, 0, connection); }
479478
| NotifyStmt { output_statement($1, 0, connection); }
480-
| PrepareStmt { output_statement($1, 0, connection); }
479+
/* | PrepareStmt { output_statement($1, 0, connection); }*/
481480
| ReindexStmt { output_statement($1, 0, connection); }
482481
| RemoveAggrStmt { output_statement($1, 0, connection); }
483482
| RemoveOperStmt { output_statement($1, 0, connection); }
@@ -671,12 +670,15 @@ stmt: AlterDatabaseSetStmt { output_statement($1, 0, connection); }
671670
*
672671
*****************************************************************************/
673672

674-
CreateUserStmt: CREATE USER UserId OptUserList
675-
{ $$ = cat_str(3, make_str("create user"), $3, $4); }
676-
| CREATE USER UserId WITH OptUserList
673+
CreateUserStmt: CREATE USER UserId opt_with OptUserList
677674
{ $$ = cat_str(4, make_str("create user"), $3, make_str("with"), $5); }
678675
;
679676

677+
opt_with: WITH { $$ = make_str("with"); }
678+
| /*EMPTY*/ { $$ = EMPTY; }
679+
;
680+
681+
680682
/*****************************************************************************
681683
*
682684
* Alter a postgresql DBMS user
@@ -1865,18 +1867,14 @@ opt_class: any_name { $$ = $1; }
18651867
;
18661868

18671869
CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args
1868-
RETURNS func_return createfunc_opt_list opt_with
1870+
RETURNS func_return createfunc_opt_list opt_definition
18691871
{ $$ = cat_str(8, make_str("create"), $2, make_str("function"), $4, $5, make_str("returns"), $7, $8); }
18701872
;
18711873

18721874
opt_or_replace: OR REPLACE { $$ = make_str("or replace"); }
18731875
| /*EMPTY*/ { $$ = EMPTY; }
18741876
;
18751877

1876-
opt_with: WITH definition { $$ = cat2_str(make_str("with"), $2); }
1877-
| /*EMPTY*/ { $$ = EMPTY; }
1878-
;
1879-
18801878
func_args: '(' func_args_list ')'
18811879
{ $$ = cat_str(3, make_str("("), $2, make_str(")")); }
18821880
| '(' ')'
@@ -2019,14 +2017,14 @@ any_operator:
20192017
;
20202018

20212019
CreateCastStmt: CREATE CAST '(' ConstTypename AS ConstTypename ')'
2022-
WITH FUNCTION function_with_argtypes opt_assignment opt_definition
2023-
{ $$ = cat_str(7, make_str("create cast ("), $4, make_str("as"), $6, make_str(") with function"), $10, $11); }
2024-
| CREATE CAST '(' ConstTypename AS ConstTypename ')'
2025-
WITH FUNCTION opt_assignment
2020+
WITH FUNCTION function_with_argtypes cast_context
20262021
{ $$ = cat_str(6, make_str("create cast ("), $4, make_str("as"), $6, make_str(") with function"), $10); }
2022+
| CREATE CAST '(' ConstTypename AS ConstTypename ')'
2023+
WITHOUT FUNCTION cast_context
2024+
{ $$ = cat_str(6, make_str("create cast ("), $4, make_str("as"), $6, make_str(") without function"), $10); }
20272025
;
20282026

2029-
opt_assignment: AS ASSIGNMENT { $$ = make_str("as assignment"); }
2027+
cast_context: AS ASSIGNMENT { $$ = make_str("as assignment"); }
20302028
| /*EMPTY*/ { $$ = EMPTY; }
20312029
;
20322030

@@ -2363,54 +2361,38 @@ ExplainStmt: EXPLAIN opt_verbose OptimizableStmt
23632361
{ $$ = cat_str(4, make_str("explain"), $2, $3, $4); }
23642362
;
23652363

2366-
/*****************************************************************************
2367-
*
2368-
* QUERY:
2369-
* PREPARE <plan_name> [(args, ...)] AS <query>
2370-
*
2371-
*****************************************************************************/
2364+
/*
2365+
2366+
conflicts with ecpg
23722367
23732368
PrepareStmt: PREPARE name prep_type_clause AS OptimizableStmt
23742369
{ $$ = cat_str(5, make_str("prepare"), $2, $3, make_str("as"), $5); }
23752370
;
23762371
23772372
prep_type_clause: '(' prep_type_list ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
2378-
| /* EMPTY */ { $$ = EMPTY; }
2373+
| /* EMPTY * / { $$ = EMPTY; }
23792374
;
23802375
23812376
prep_type_list: Typename { $$ = $1; }
23822377
| prep_type_list ',' Typename { $$ = cat_str(3, $1, make_str(","), $3); }
23832378
;
23842379
2385-
/*****************************************************************************
2386-
*
2387-
* QUERY:
2388-
* EXECUTE <plan_name> [(params, ...)] [INTO ...]
2389-
*
2390-
*****************************************************************************/
2391-
23922380
ExecuteStmt: EXECUTE name execute_param_clause into_clause
23932381
{ $$ = cat_str(4, make_str("execute"), $2, $3, $4); }
23942382
;
23952383
23962384
execute_param_clause: '(' execute_param_list ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
2397-
| /* EMPTY */ { $$ = EMPTY; }
2385+
| /* EMPTY * / { $$ = EMPTY; }
23982386
;
23992387
24002388
execute_param_list: a_expr { $$ = $1; }
24012389
| execute_param_list ',' a_expr { $$ = cat_str(3, $1, make_str(","), $3); }
24022390
;
2403-
2404-
/*****************************************************************************
2405-
*
2406-
* QUERY:
2407-
* DEALLOCATE [PREPARE] <plan_name>
2408-
*
2409-
*****************************************************************************/
24102391
24112392
DeallocateStmt: DEALLOCATE name { $$ = cat2_str(make_str("deallocate"), $2); }
24122393
| DEALLOCATE PREPARE name { $$ = cat2_str(make_str("deallocate prepare"), $3); }
24132394
;
2395+
*/
24142396

24152397
/*****************************************************************************
24162398
* *
@@ -4112,7 +4094,10 @@ ECPGCursorStmt: DECLARE name opt_cursor CURSOR FOR ident
41124094
* prepared statement
41134095
*/
41144096
ECPGDeallocate: DEALLOCATE PREPARE ident
4115-
{ $$ = cat_str(3, make_str("ECPGdeallocate(__LINE__, \""), $3, make_str("\");")); };
4097+
{ $$ = cat_str(3, make_str("ECPGdeallocate(__LINE__, \""), $3, make_str("\");")); }
4098+
| DEALLOCATE ident
4099+
{ $$ = cat_str(2, make_str("ECPGdeallocate(__LINE__, \""), $2, make_str("\");")); }
4100+
;
41164101

41174102
/*
41184103
* variable declaration inside the exec sql declare block
@@ -5177,6 +5162,7 @@ unreserved_keyword:
51775162
| HOUR_P { $$ = make_str("hour"); }
51785163
| IMMEDIATE { $$ = make_str("immediate"); }
51795164
| IMMUTABLE { $$ = make_str("immutable"); }
5165+
| IMPLICIT_P { $$ = make_str("implicit"); }
51805166
| INCREMENT { $$ = make_str("increment"); }
51815167
| INDEX { $$ = make_str("index"); }
51825168
| INHERITS { $$ = make_str("inherits"); }

0 commit comments

Comments
 (0)
0