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

Commitbc42387

Browse files
author
Michael Meskes
committed
Applied a patch by Zoltán Böszörményi that makes ecpg's parser accept dynamic cursornames even in WHERE CURRENT OF clauses.
1 parent5c63982 commitbc42387

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎src/backend/parser/gram.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9031,7 +9031,7 @@ where_clause:
90319031
/* variant for UPDATE and DELETE*/
90329032
where_or_current_clause:
90339033
WHEREa_expr{$$ =$2; }
9034-
|WHERECURRENT_POFname
9034+
|WHERECURRENT_POFcursor_name
90359035
{
90369036
CurrentOfExpr *n = makeNode(CurrentOfExpr);
90379037
/* cvarno is filled in by parse analysis*/

‎src/interfaces/ecpg/preproc/ecpg.addons

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ ECPG: stmtViewStmt rule
192192

193193
output_simple_statement($1);
194194
}
195+
ECPG: where_or_current_clauseWHERECURRENT_POFcursor_name block
196+
{
197+
char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
198+
$$ = cat_str(2,mm_strdup("where current of"), cursor_marker);
199+
}
195200
ECPG: CopyStmtCOPYopt_binaryqualified_nameopt_column_listopt_oidscopy_fromcopy_file_namecopy_delimiteropt_withcopy_options addon
196201
if (strcmp($6, "to") == 0 && strcmp($7, "stdin") == 0)
197202
mmerror(PARSE_ERROR, ET_ERROR, "COPY TO STDIN is not possible");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp