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

Commitcf92593

Browse files
committed
Fix for new Boolean node
The token in nodeTokenType() is actually the whole rest of the string,so we need to take into account the length to do the correctcomparison.Without this, postgres_fdw tests fail under-DWRITE_READ_PARSE_PLAN_TREES.
1 parent941460f commitcf92593

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/nodes/read.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ nodeTokenType(const char *token, int length)
283283
retval=RIGHT_PAREN;
284284
elseif (*token=='{')
285285
retval=LEFT_BRACE;
286-
elseif (strcmp(token,"true")==0||strcmp(token,"false")==0)
286+
elseif ((length==4&&strncmp(token,"true",4)==0)||
287+
(length==5&&strncmp(token,"false",5)==0))
287288
retval=T_Boolean;
288289
elseif (*token=='"'&&length>1&&token[length-1]=='"')
289290
retval=T_String;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp