diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-08-07 03:36:07 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-08-07 03:36:07 +0000 |
commit | 21d16121bf00032466a2ad0c51b00ab6d5271267 (patch) | |
tree | a477973953ae2685167f5847dcdf7ffe9d287c9a | |
parent | a1c2ed7b0287fa58975eca20faae5c72877de30f (diff) |
Ignore trailing spaces in psql \h.
Greg Sabino Mullane
-rw-r--r-- | src/bin/psql/help.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index f55ee7a0b0b..3d4fa5b7aff 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.90 2004/07/15 03:56:06 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.91 2004/08/07 03:36:07 momjian Exp $ */ #include "postgres_fe.h" #include "common.h" @@ -310,9 +310,9 @@ helpSQL(const char *topic, unsigned short int pager) int nl_count = 0; char *ch; - /* don't care about trailing spaces */ + /* don't care about trailing spaces or semicolons */ len = strlen(topic); - while (topic[len - 1] == ' ') + while (topic[len - 1] == ' ' || topic[len - 1] == ';') len--; /* Count newlines for pager */ |