summaryrefslogtreecommitdiff
path: root/src/bin/psql/tab-complete.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/tab-complete.c')
-rw-r--r--src/bin/psql/tab-complete.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index f519b460b45..9feb9055a97 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.23 2000/12/03 14:36:47 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.24 2000/12/03 20:45:38 tgl Exp $
*/
/*----------------------------------------------------------------------
@@ -50,7 +50,7 @@
/* If we don't have this, we might as well forget about the whole thing: */
#ifdef USE_READLINE
-#include <ctype.h> /* toupper */
+#include <ctype.h>
#ifdef USE_ASSERT_CHECKING
#include <assert.h>
#endif
@@ -440,7 +440,8 @@ psql_completion(char *text, int start, int end)
/* Complete "AS ON <sth with a 'T' :)>" with a "TO" */
else if (strcasecmp(prev3_wd, "AS") == 0 &&
strcasecmp(prev2_wd, "ON") == 0 &&
- (toupper(prev_wd[4]) == 'T' || toupper(prev_wd[5]) == 'T'))
+ (toupper((unsigned char) prev_wd[4]) == 'T' ||
+ toupper((unsigned char) prev_wd[5]) == 'T'))
COMPLETE_WITH_CONST("TO");
/* Complete "AS ON <sth> TO" with a table name */
else if (strcasecmp(prev4_wd, "AS") == 0 &&