diff options
author | Bruce Momjian <bruce@momjian.us> | 1997-11-17 17:54:24 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1997-11-17 17:54:24 +0000 |
commit | d0928a3af32aa0e9ae4d500f1c14a318634ab93e (patch) | |
tree | bb592858aa5a961310c695033a15640a92e23584 | |
parent | d0471244e62ee530f6eb2a840add4344cc7327d1 (diff) | |
download | postgresql-d0928a3af32aa0e9ae4d500f1c14a318634ab93e.tar.gz postgresql-d0928a3af32aa0e9ae4d500f1c14a318634ab93e.zip |
Fix \e for empty file.
-rw-r--r-- | src/bin/psql/psql.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index 9deeb490c9a..331960753d1 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.109 1997/11/17 05:23:11 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.110 1997/11/17 17:54:24 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -2099,7 +2099,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source) * for next command */ - if (line == NULL || *line == '\0') + if (line == NULL || (!interactive && *line == '\0')) { /* No more input. Time to quit, or \i done */ if (!pset->quiet) printf("EOF\n");/* Goes on prompt line */ @@ -2127,6 +2127,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source) if (!interactive && !pset->singleStep && !pset->quiet) fprintf(stderr, "%s\n", line); + slashCmdStatus = CMD_UNKNOWN; /* nothing on line after trimming? then ignore */ if (line[0] == '\0') { @@ -2265,7 +2266,6 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source) continue; } - slashCmdStatus = CMD_UNKNOWN; if (!in_quote && query_start[0] == '\\') { slashCmdStatus = HandleSlashCmds(pset, |