diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-09-22 21:39:58 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-09-22 21:39:58 +0000 |
| commit | beca984e5f1c315d02064e69861be112f5a69b3d (patch) | |
| tree | b06b0b54e649824380e3b35822c1c054dac24608 /src/bin/psql/tab-complete.c | |
| parent | 6d0efd3a092ec60c7e27b53e604cbc87ba3c8e2c (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/bin/psql/tab-complete.c')
| -rw-r--r-- | src/bin/psql/tab-complete.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index f8edb78b570..64b9576a662 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2006, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.154 2006/07/14 14:52:27 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.155 2006/09/22 21:39:57 tgl Exp $ */ /*---------------------------------------------------------------------- @@ -1090,8 +1090,8 @@ psql_completion(char *text, int start, int end) /* Complete "AS ON <sth with a 'T' :)>" with a "TO" */ else if (pg_strcasecmp(prev3_wd, "AS") == 0 && pg_strcasecmp(prev2_wd, "ON") == 0 && - (toupper((unsigned char) prev_wd[4]) == 'T' || - toupper((unsigned char) prev_wd[5]) == 'T')) + (pg_toupper((unsigned char) prev_wd[4]) == 'T' || + pg_toupper((unsigned char) prev_wd[5]) == 'T')) COMPLETE_WITH_CONST("TO"); /* Complete "AS ON <sth> TO" with a table name */ else if (pg_strcasecmp(prev4_wd, "AS") == 0 && |
