diff options
| author | Michael Meskes | 2011-02-18 10:16:16 +0000 |
|---|---|---|
| committer | Michael Meskes | 2011-02-18 10:16:16 +0000 |
| commit | bc423879cc2db964231f1d4c912961f3e35a6ece (patch) | |
| tree | fc4d1e53ccb1067e3eca7fcb99ef8fd4f0ec86f8 /src/interfaces | |
| parent | 5c63982af2a5d2da90259e878efb43f16ee13ce3 (diff) | |
Applied a patch by Zoltán Böszörményi that makes ecpg's parser accept dynamic cursornames even in WHERE CURRENT OF clauses.
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.addons | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.addons b/src/interfaces/ecpg/preproc/ecpg.addons index c14b2f302e7..a689dbc70e6 100644 --- a/src/interfaces/ecpg/preproc/ecpg.addons +++ b/src/interfaces/ecpg/preproc/ecpg.addons @@ -192,6 +192,11 @@ ECPG: stmtViewStmt rule output_simple_statement($1); } +ECPG: where_or_current_clauseWHERECURRENT_POFcursor_name block + { + char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4; + $$ = cat_str(2,mm_strdup("where current of"), cursor_marker); + } ECPG: CopyStmtCOPYopt_binaryqualified_nameopt_column_listopt_oidscopy_fromcopy_file_namecopy_delimiteropt_withcopy_options addon if (strcmp($6, "to") == 0 && strcmp($7, "stdin") == 0) mmerror(PARSE_ERROR, ET_ERROR, "COPY TO STDIN is not possible"); |
