Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd0928a3

Browse files
committed
Fix \e for empty file.
1 parentd047124 commitd0928a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/bin/psql/psql.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.109 1997/11/1705:23:11 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.110 1997/11/1717:54:24 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -2099,7 +2099,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
20992099
* for next command
21002100
*/
21012101

2102-
if (line==NULL||*line=='\0')
2102+
if (line==NULL||(!interactive&&*line=='\0'))
21032103
{/* No more input.Time to quit, or \i done */
21042104
if (!pset->quiet)
21052105
printf("EOF\n");/* Goes on prompt line */
@@ -2127,6 +2127,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
21272127
if (!interactive&& !pset->singleStep&& !pset->quiet)
21282128
fprintf(stderr,"%s\n",line);
21292129

2130+
slashCmdStatus=CMD_UNKNOWN;
21302131
/* nothing on line after trimming? then ignore */
21312132
if (line[0]=='\0')
21322133
{
@@ -2265,7 +2266,6 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
22652266
continue;
22662267
}
22672268

2268-
slashCmdStatus=CMD_UNKNOWN;
22692269
if (!in_quote&&query_start[0]=='\\')
22702270
{
22712271
slashCmdStatus=HandleSlashCmds(pset,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp