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

Commit0cedfa7

Browse files
author
Michael Meskes
committed
ECPG: Fix searching for quoted cursor names case-sensitively.
Patch by Böszörményi Zoltán <zb@cybertec.at>
1 parent6bb2972 commit0cedfa7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ ECPG: DeclareCursorStmtDECLAREcursor_namecursor_optionsCURSORopt_holdFORSelectSt
296296
struct cursor *ptr, *this;
297297
char *cursor_marker = $2[0] == ':' ? mm_strdup("$0") : mm_strdup($2);
298298
char *comment, *c1, *c2;
299-
int (* strcmp_fn)(const char *, const char *) = ($2[0] == ':' ? strcmp : pg_strcasecmp);
299+
int (* strcmp_fn)(const char *, const char *) = (($2[0] == ':' || $2[0] == '"') ? strcmp : pg_strcasecmp);
300300

301301
for (ptr = cur; ptr != NULL; ptr = ptr->next)
302302
{

‎src/interfaces/ecpg/preproc/ecpg.header

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ add_additional_variables(char *name, bool insert)
477477
{
478478
struct cursor *ptr;
479479
struct arguments *p;
480-
int (* strcmp_fn)(const char *, const char *) = (name[0] == ':' ? strcmp : pg_strcasecmp);
480+
int (* strcmp_fn)(const char *, const char *) = ((name[0] == ':' || name[0] == '"') ? strcmp : pg_strcasecmp);
481481

482482
for (ptr = cur; ptr != NULL; ptr=ptr->next)
483483
{

‎src/interfaces/ecpg/preproc/ecpg.trailer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ ECPGCursorStmt: DECLARE cursor_name cursor_options CURSOR opt_hold FOR prepared
291291
{
292292
struct cursor *ptr, *this;
293293
char *cursor_marker = $2[0] == ':' ? mm_strdup("$0") : mm_strdup($2);
294-
int (* strcmp_fn)(const char *, const char *) = ($2[0] == ':' ? strcmp : pg_strcasecmp);
294+
int (* strcmp_fn)(const char *, const char *) = (($2[0] == ':' || $2[0] == '"') ? strcmp : pg_strcasecmp);
295295
struct variable *thisquery = (struct variable *)mm_alloc(sizeof(struct variable));
296296
const char *con = connection ? connection : "NULL";
297297
char *comment;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp