Skip to content

Commit ea0ca75

Browse files
author
Michael Meskes
committed
Changed ecpg parser to allow RETURNING clauses without attached C variables.
1 parent 004a970 commit ea0ca75

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
@@ -1877,16 +1877,19 @@ Iresult: Iconst { $$ = $1; }
18771877
;
18781878

18791879
execute_rest: /* EMPTY */ { $$ = EMPTY; }
1880-
| ecpg_using ecpg_into { $$ = EMPTY; }
1880+
| ecpg_using opt_ecpg_into { $$ = EMPTY; }
18811881
| ecpg_into ecpg_using { $$ = EMPTY; }
1882-
| ecpg_using { $$ = EMPTY; }
18831882
| ecpg_into { $$ = EMPTY; }
18841883
;
18851884

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

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

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
@@ -98,7 +98,7 @@
9898
'VariableShowStmtSHOWSESSIONAUTHORIZATION' =>
9999
'SHOW SESSION AUTHORIZATION ecpg_into',
100100
'returning_clauseRETURNINGtarget_list' =>
101-
'RETURNING target_list ecpg_into',
101+
'RETURNING target_list opt_ecpg_into',
102102
'ExecuteStmtEXECUTEnameexecute_param_clause' =>
103103
'EXECUTE prepared_name execute_param_clause execute_rest',
104104
'ExecuteStmtCREATEOptTempTABLEcreate_as_targetASEXECUTEnameexecute_param_clause'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy