Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit0e25360

Browse files
author
Michael Meskes
committed
Synced yet again.
Deactivated backend prepare/execute/deallocate for the time being.
1 parentd28ec4f commit0e25360

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 IMMUTABLEIMPLICIT_PIN_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_textConstraintDeferrabilitySpecTableElementList
290290
%type<str>key_matchColLabelSpecialRuleRelationColIdcolumnDef
291291
%type<str>ColConstraintColConstraintElemdrop_typeBconst
292-
%type<str>TableConstraintOptTableElementListXconstprep_type_clause
293-
%type<str>ConstraintElemkey_actionsColQualListtype_namePrepareStmt
292+
%type<str>TableConstraintOptTableElementListXconst
293+
%type<str>ConstraintElemkey_actionsColQualListtype_name
294294
%type<str>target_listtarget_elupdate_target_listalias_clause
295295
%type<str>update_target_elopt_idqualified_namedatabase_name
296296
%type<str>access_methodattr_nameindex_namenamefunc_name
@@ -301,7 +301,7 @@ make_name(void)
301301
%type<str>trim_listin_exprsubstr_forattrsTableFuncElement
302302
%type<str>TypenameSimpleTypenameNumericopt_floatopt_numeric
303303
%type<str>opt_decimalCharactercharacteropt_varyingopt_charset
304-
%type<str>opt_collateopt_timezoneopt_intervaltable_refDeallocateStmt
304+
%type<str>opt_collateopt_timezoneopt_intervaltable_ref
305305
%type<str>row_descriptorrow_listConstDatetimetrans_options
306306
%type<str>SelectStmtinto_clauseOptTempConstraintAttributeSpec
307307
%type<str>opt_tableopt_allsort_clausesortby_listConstraintAttr
@@ -322,7 +322,7 @@ make_name(void)
322322
%type<str>def_elemdef_listdefinitionDefineStmtselect_with_parens
323323
%type<str>opt_insteadeventRuleActionListopt_usingCreateAssertStmt
324324
%type<str>RuleActionStmtOrEmptyRuleActionMultifunc_asreindex_type
325-
%type<str>RuleStmtopt_columnopt_nameoper_argtypesNumConstExecuteStmt
325+
%type<str>RuleStmtopt_columnopt_nameoper_argtypesNumConst
326326
%type<str>MathOpRemoveFuncStmtaggr_argtypefor_update_clause
327327
%type<str>RemoveAggrStmtopt_proceduralselect_no_parensCreateCastStmt
328328
%type<str>RemoveOperStmtRenameStmtall_Opopt_Trustedopt_lancompiler
@@ -362,13 +362,13 @@ make_name(void)
362362
%type<str>CreateFunctionStmtcreatefunc_opt_listfunc_table
363363
%type<str>DropUserStmtcopy_fromcopy_opt_listopt_modecopy_opt_item
364364
%type<str>opt_oidsTableLikeClausekey_actionopt_definition
365-
%type<str>opt_assignmentrowr_exprqual_Opqual_all_Opopt_default
365+
%type<str>cast_contextrowr_exprqual_Opqual_all_Opopt_default
366366
%type<str>CreateConversionStmtany_operatoropclass_item_list
367-
%type<str>iso_levelconvert_listprep_type_list
367+
%type<str>iso_levelconvert_list
368368
%type<str>convert_argstype_listCharacterWithLengthConstCharacter
369369
%type<str>CharacterWithoutLengthBitWithLengthBitWithoutLength
370-
%type<str>ConstBitGenericTypeTableFuncElementListexecute_param_clause
371-
%type<str>execute_param_listopt_sort_clause
370+
%type<str>ConstBitGenericTypeTableFuncElementList
371+
%type<str>opt_sort_clause
372372

373373
%type<str>ECPGWheneverECPGConnectconnection_targetECPGOpen
374374
%type<str>indicatorECPGExecuteECPGPrepareopt_ecpg_usingecpg_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:CREATEUSERUserIdOptUserList
675-
{$$ = cat_str(3, make_str("create user"),$3,$4); }
676-
|CREATEUSERUserIdWITHOptUserList
673+
CreateUserStmt:CREATEUSERUserIdopt_withOptUserList
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:CREATEopt_or_replaceFUNCTIONfunc_namefunc_args
1868-
RETURNSfunc_returncreatefunc_opt_listopt_with
1870+
RETURNSfunc_returncreatefunc_opt_listopt_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:ORREPLACE{$$ = make_str("or replace"); }
18731875
|/*EMPTY*/{$$ = EMPTY; }
18741876
;
18751877

1876-
opt_with:WITHdefinition{$$ = 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:CREATECAST'('ConstTypenameASConstTypename')'
2022-
WITHFUNCTIONfunction_with_argtypesopt_assignmentopt_definition
2023-
{$$ = cat_str(7, make_str("create cast ("),$4, make_str("as"),$6, make_str(") with function"),$10,$11); }
2024-
|CREATECAST'('ConstTypenameASConstTypename')'
2025-
WITHFUNCTIONopt_assignment
2020+
WITHFUNCTIONfunction_with_argtypescast_context
20262021
{$$ = cat_str(6, make_str("create cast ("),$4, make_str("as"),$6, make_str(") with function"),$10); }
2022+
|CREATECAST'('ConstTypenameASConstTypename')'
2023+
WITHOUTFUNCTIONcast_context
2024+
{$$ = cat_str(6, make_str("create cast ("),$4, make_str("as"),$6, make_str(") without function"),$10); }
20272025
;
20282026

2029-
opt_assignment:ASASSIGNMENT {$$ = make_str("as assignment"); }
2027+
cast_context:ASASSIGNMENT {$$ = 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:DEALLOCATEPREPAREident
4115-
{$$ = cat_str(3, make_str("ECPGdeallocate(__LINE__,\""),$3, make_str("\");")); };
4097+
{$$ = cat_str(3, make_str("ECPGdeallocate(__LINE__,\""),$3, make_str("\");")); }
4098+
|DEALLOCATEident
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)

[8]ページ先頭

©2009-2025 Movatter.jp