8000 Changed ecpg parser to allow RETURNING clauses without attached C var… · dirbacke/postgres@bd50275 · GitHub
[go: up one dir, main page]

Skip to content

Commit bd50275

Browse files
author
Michael Meskes
committed
Changed ecpg parser to allow RETURNING clauses without attached C variables.
1 parent 76447fe commit bd50275

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/interfaces/ecpg/preproc/ecpg.trailer

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,16 +1878,19 @@ Iresult: Iconst { $$ = $1; }
18781878
;
18791879

18801880
execute_rest: /* EMPTY */ { $$ = EMPTY; }
1881-
| ecpg_using ecpg_into { $$ = EMPTY; }
1881+
| ecpg_using opt_ecpg_into { $$ = EMPTY; }
18821882
| ecpg_into ecpg_using { $$ = EMPTY; }
1883-
| ecpg_using { $$ = EMPTY; }
18841883
| ecpg_into { $$ = EMPTY; }
18851884
;
18861885

18871886
ecpg_into: INTO into_list { $$ = EMPTY; }
18881887
| into_descriptor { $$ = $1; }
18891888
;
18901889

1890+
opt_ecpg_into: /* EMPTY */ { $$ = EMPTY; }
1891+
| ecpg_into { $$ = $1; }
1892+
;
1893+
18911894
ecpg_fetch_into: ecpg_into { $$ = $1; }
18921895
| using_descriptor
18931896
{

src/interfaces/ecpg/preproc/ecpg.type

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
%type <str> opt_bit_field
7979
%type <str> opt_connection_name
8080
%type <str> opt_database_name
81+
%type <str> opt_ecpg_into
8182
%type <str> opt_ecpg_fetch_into
8283
%type <str> opt_ecpg_using
8384
%type <str> opt_initializer

src/interfaces/ecpg/preproc/parse.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
'VariableShowStmtSHOWSESSIONAUTHORIZATION' =>
9696
'SHOW SESSION AUTHORIZATION ecpg_into',
9797
'returning_clauseRETURNINGtarget_list' =>
98-
'RETURNING target_list ecpg_into',
98+
'RETURNING target_list opt_ecpg_into',
9999
'ExecuteStmtEXECUTEnameexecute_param_clause' =>
100100
'EXECUTE prepared_name execute_param_clause execute_rest',
101101
'ExecuteStmtCREATEOptTempTABLEcreate_as_targetASEXECUTEnameexecute_param_clause'

0 commit comments

Comments
 (0)
0