summaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-09-22 21:39:58 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-09-22 21:39:58 +0000
commitbeca984e5f1c315d02064e69861be112f5a69b3d (patch)
treeb06b0b54e649824380e3b35822c1c054dac24608 /src/backend/utils
parent6d0efd3a092ec60c7e27b53e604cbc87ba3c8e2c (diff)
Fix bugs in plpgsql and ecpg caused by assuming that isspace() would only
return true for exactly the characters treated as whitespace by their flex scanners. Per report from Victor Snezhko and subsequent investigation. Also fix a passel of unsafe usages of <ctype.h> functions, that is, ye olde char-vs-unsigned-char issue. I won't miss <ctype.h> when we are finally able to stop using it.
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/misc/guc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 7f7ded9e6a5..9467e6412c6 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.351 2006/09/22 17:41:21 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.352 2006/09/22 21:39:57 tgl Exp $
*
*--------------------------------------------------------------------
*/
@@ -6155,7 +6155,7 @@ assign_custom_variable_classes(const char *newval, bool doit, GucSource source)
initStringInfo(&buf);
while ((c = *cp++) != 0)
{
- if (isspace(c))
+ if (isspace((unsigned char) c))
{
if (symLen > 0)
hasSpaceAfterToken = true;
@@ -6173,7 +6173,7 @@ assign_custom_variable_classes(const char *newval, bool doit, GucSource source)
continue;
}
- if (hasSpaceAfterToken || !isalnum(c))
+ if (hasSpaceAfterToken || !isalnum((unsigned char) c))
{
/*
* Syntax error due to token following space after token or non