Skip to content

Commit 21d1612

Browse files
committed
Ignore trailing spaces in psql \h.
Greg Sabino Mullane
1 parent a1c2ed7 commit 21d1612

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/psql/help.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.90 2004/07/15 03:56:06 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.91 2004/08/07 03:36:07 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "common.h"
@@ -310,9 +310,9 @@ helpSQL(const char *topic, unsigned short int pager)
310310
int nl_count = 0;
311311
char *ch;
312312

313-
/* don't care about trailing spaces */
313+
/* don't care about trailing spaces or semicolons */
314314
len = strlen(topic);
315-
while (topic[len - 1] == ' ')
315+
while (topic[len - 1] == ' ' || topic[len - 1] == ';')
316316
len--;
317317

318318
/* Count newlines for pager */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy