1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Ignore trailing spaces in psql \h.

Greg Sabino Mullane
This commit is contained in:
Bruce Momjian
2004-08-07 03:36:07 +00:00
parent a1c2ed7b02
commit 21d16121bf

View File

@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2003, PostgreSQL Global Development Group * 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 "postgres_fe.h"
#include "common.h" #include "common.h"
@ -310,9 +310,9 @@ helpSQL(const char *topic, unsigned short int pager)
int nl_count = 0; int nl_count = 0;
char *ch; char *ch;
/* don't care about trailing spaces */ /* don't care about trailing spaces or semicolons */
len = strlen(topic); len = strlen(topic);
while (topic[len - 1] == ' ') while (topic[len - 1] == ' ' || topic[len - 1] == ';')
len--; len--;
/* Count newlines for pager */ /* Count newlines for pager */