@@ -90,7 +90,7 @@ PG_MODULE_MAGIC;
90
90
errdetail detail))
91
91
92
92
#define skip_space (str ) \
93
- while (isspace(*str) && (*str &0x80)== 0) \
93
+ while (isspace(*str) && (*str & 0x80)== 0) \
94
94
str++;
95
95
96
96
enum
@@ -901,7 +901,7 @@ quote_value(StringInfo buf, const char *value)
901
901
902
902
for (str = value ; * str != '\0' ; str ++ )
903
903
{
904
- if (isspace (* str ) || * str == '(' || * str == ')' || * str == '"' )
904
+ if (( isspace (* str ) && ((( * str ) & 0x80 ) == 0 ) ) || * str == '(' || * str == ')' || * str == '"' )
905
905
{
906
906
need_quote = true;
907
907
appendStringInfoCharMacro (buf , '"' );
@@ -1249,7 +1249,7 @@ parse_keyword(const char *str, StringInfo buf)
1249
1249
{
1250
1250
skip_space (str );
1251
1251
1252
- while (!isspace (* str ) && * str != '(' && * str != '\0' )
1252
+ while (!( isspace (* str ) && ( * str & 0x80 ) == 0 ) && * str != '(' && * str != '\0' )
1253
1253
appendStringInfoCharMacro (buf , * str ++ );
1254
1254
1255
1255
return str ;
@@ -1329,7 +1329,7 @@ parse_quoted_value(const char *str, char **word, bool truncate)
1329
1329
break ;
1330
1330
}
1331
1331
}
1332
- else if (isspace (* str ) || * str == '(' || * str == ')' || * str == '"' ||
1332
+ else if (( isspace (* str ) && (( * str & 0x80 ) == 0 ) ) || * str == '(' || * str == ')' || * str == '"' ||
1333
1333
* str == '\0' )
1334
1334
break ;
1335
1335
@@ -1699,7 +1699,7 @@ get_hints_from_comment(const char *p)
1699
1699
if (!(* p >= '0' && * p <= '9' ) &&
1700
1700
!(* p >= 'A' && * p <= 'Z' ) &&
1701
1701
!(* p >= 'a' && * p <= 'z' ) &&
1702
- !isspace (* p ) &&
1702
+ ( !isspace (* p ) || ( * p & 0x80 ) ) &&
1703
1703
* p != '_' &&
1704
1704
* p != ',' &&
1705
1705
* p != '(' && * p != ')' )
0 commit comments