diff options
author | Bruce Momjian | 1997-01-10 20:52:32 +0000 |
---|---|---|
committer | Bruce Momjian | 1997-01-10 20:52:32 +0000 |
commit | ce02ccf43d7b57c98d73bc0cb1db3dc036a350df (patch) | |
tree | 1f85015477ab17199466085c7a0dca9434ca85a7 | |
parent | 0567d7edb028bf7029c4eacca67df6747e6a3a22 (diff) |
I've noticed that \i filename in 6.0beta prints the input file double-spaced.
Here is a trivial patch to get back the 1.09 behavior; it just removes trailing
newlines before printing the line out with a newline rather than after...
Thomas Lockhart
-rw-r--r-- | src/bin/psql/psql.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index 683f7663455..9c5bf7efaab 100644 --- a/src/bin/psql/psql.c +++ b/src/bin/psql/psql.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.46 1997/01/05 23:46:17 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.47 1997/01/10 20:52:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1289,12 +1289,12 @@ MainLoop(PsqlSettings * settings, FILE * source) printf("EOF\n"); /* Goes on prompt line */ eof = true; } else { - if (!interactive && !settings->singleStep && !settings->quiet) - fprintf(stderr, "%s\n", line); - /* remove whitespaces on the right, incl. \n's */ line = rightTrim(line); + if (!interactive && !settings->singleStep && !settings->quiet) + fprintf(stderr, "%s\n", line); + if (line[0] == '\0') { free(line); continue; |