summaryrefslogtreecommitdiff
path: root/contrib/spi/refint.c
diff options
context:
space:
mode:
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;