summaryrefslogtreecommitdiff
path: root/contrib/spi/refint.c
diff options
context:
space:
mode:
authorTom Lane2000-12-03 20:45:40 +0000
committerTom Lane2000-12-03 20:45:40 +0000
commita27b691e2903a886be640db801677f6f988d3793 (patch)
treec68f25c9edef18954e9c5b3d74893f1df87b8871 /contrib/spi/refint.c
parent4d2a506526ceacab5f75df040596a5287ab40612 (diff)
Ensure that all uses of <ctype.h> functions are applied to unsigned-char
values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
Diffstat (limited to 'contrib/spi/refint.c')
-rw-r--r--contrib/spi/refint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index d7a8d73c8e1..ea8851816f5 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -5,7 +5,7 @@
#include "executor/spi.h" /* this is what you need to work with SPI */
#include "commands/trigger.h" /* -"- and triggers */
-#include <ctype.h> /* tolower () */
+#include <ctype.h>
extern Datum check_primary_key(PG_FUNCTION_ARGS);
@@ -293,7 +293,7 @@ check_foreign_key(PG_FUNCTION_ARGS)
nrefs = pg_atoi(args[0], sizeof(int), 0);
if (nrefs < 1)
elog(ERROR, "check_foreign_key: %d (< 1) number of references specified", nrefs);
- action = tolower(*(args[1]));
+ action = tolower((unsigned char) *(args[1]));
if (action != 'r' && action != 'c' && action != 's')
elog(ERROR, "check_foreign_key: invalid action %s", args[1]);
nargs -= 2;