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

Commit4627a8f

Browse files
committed
Revert ill-considered change to plpgsql: it should not rely on the
current setting of standard_conforming_strings to decide how to quotestrings that will be used later. There is much more to do here butthis particular change breaks the build on Windows, so fix it now.
1 parent58a2dbc commit4627a8f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎src/pl/plpgsql/src/gram.y

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.89 2006/05/26 23:48:54 momjian Exp $
12+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.90 2006/05/27 19:45:52 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
1616

1717
#include"plpgsql.h"
1818

1919
#include"parser/parser.h"
20-
#include"parser/gramparse.h"
20+
2121

2222
static PLpgSQL_expr*read_sql_construct(int until,
2323
int until2,
@@ -377,12 +377,16 @@ decl_statement: decl_varname decl_const decl_datatype decl_notnull decl_defval
377377
strcpy(buf,"SELECT");
378378
cp1 =new->refname;
379379
cp2 = buf + strlen(buf);
380-
if (!standard_conforming_strings && strchr(cp1,'\\') !=NULL)
380+
/*
381+
* Don't trust standard_conforming_strings here;
382+
* it might change before we use the string.
383+
*/
384+
if (strchr(cp1,'\\') !=NULL)
381385
*cp2++ = ESCAPE_STRING_SYNTAX;
382386
*cp2++ ='\'';
383387
while (*cp1)
384388
{
385-
if (SQL_STR_DOUBLE(*cp1,!standard_conforming_strings))
389+
if (SQL_STR_DOUBLE(*cp1,true))
386390
*cp2++ = *cp1;
387391
*cp2++ = *cp1++;
388392
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp