aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/utils/adt/regproc.c7
-rw-r--r--src/backend/utils/adt/varlena.c16
2 files changed, 12 insertions, 11 deletions
diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c
index ac1141a04ea..a22d0b8187d 100644
--- a/src/backend/utils/adt/regproc.c
+++ b/src/backend/utils/adt/regproc.c
@@ -35,6 +35,7 @@
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "parser/parse_type.h"
+#include "parser/scansup.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
@@ -1911,7 +1912,7 @@ parseNameAndArgTypes(const char *string, bool allowNone, List **names,
ptr2 = ptr + strlen(ptr);
while (--ptr2 > ptr)
{
- if (!isspace((unsigned char) *ptr2))
+ if (!scanner_isspace(*ptr2))
break;
}
if (*ptr2 != ')')
@@ -1928,7 +1929,7 @@ parseNameAndArgTypes(const char *string, bool allowNone, List **names,
for (;;)
{
/* allow leading whitespace */
- while (isspace((unsigned char) *ptr))
+ while (scanner_isspace(*ptr))
ptr++;
if (*ptr == '\0')
{
@@ -1984,7 +1985,7 @@ parseNameAndArgTypes(const char *string, bool allowNone, List **names,
/* Lop off trailing whitespace */
while (--ptr2 >= typename)
{
- if (!isspace((unsigned char) *ptr2))
+ if (!scanner_isspace(*ptr2))
break;
*ptr2 = '\0';
}
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 4971a26564e..0fda3c53fb7 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -2921,7 +2921,7 @@ SplitIdentifierString(char *rawstring, char separator,
*namelist = NIL;
- while (isspace((unsigned char) *nextp))
+ while (scanner_isspace(*nextp))
nextp++; /* skip leading whitespace */
if (*nextp == '\0')
@@ -2959,7 +2959,7 @@ SplitIdentifierString(char *rawstring, char separator,
curname = nextp;
while (*nextp && *nextp != separator &&
- !isspace((unsigned char) *nextp))
+ !scanner_isspace(*nextp))
nextp++;
endp = nextp;
if (curname == nextp)
@@ -2981,13 +2981,13 @@ SplitIdentifierString(char *rawstring, char separator,
pfree(downname);
}
- while (isspace((unsigned char) *nextp))
+ while (scanner_isspace(*nextp))
nextp++; /* skip trailing whitespace */
if (*nextp == separator)
{
nextp++;
- while (isspace((unsigned char) *nextp))
+ while (scanner_isspace(*nextp))
nextp++; /* skip leading whitespace for next */
/* we expect another name, so done remains false */
}
@@ -3046,7 +3046,7 @@ SplitDirectoriesString(char *rawstring, char separator,
*namelist = NIL;
- while (isspace((unsigned char) *nextp))
+ while (scanner_isspace(*nextp))
nextp++; /* skip leading whitespace */
if (*nextp == '\0')
@@ -3083,7 +3083,7 @@ SplitDirectoriesString(char *rawstring, char separator,
while (*nextp && *nextp != separator)
{
/* trailing whitespace should not be included in name */
- if (!isspace((unsigned char) *nextp))
+ if (!scanner_isspace(*nextp))
endp = nextp + 1;
nextp++;
}
@@ -3091,13 +3091,13 @@ SplitDirectoriesString(char *rawstring, char separator,
return false; /* empty unquoted name not allowed */
}
- while (isspace((unsigned char) *nextp))
+ while (scanner_isspace(*nextp))
nextp++; /* skip trailing whitespace */
if (*nextp == separator)
{
nextp++;
- while (isspace((unsigned char) *nextp))
+ while (scanner_isspace(*nextp))
nextp++; /* skip leading whitespace for next */
/* we expect another name, so done remains false */
}