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

Commit3a7f545

Browse files
committed
fflush the \o file, if any, after each backslash command. We already
do this for ordinary SQL commands, so it seems consistent to do it forbackslash commands too. Per gripe from Rajesh Kumar Mallah.
1 parent36b8706 commit3a7f545

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎src/bin/psql/command.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.175 2006/12/16 00:38:43 adunstan Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.176 2006/12/28 00:29:13 tgl Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"command.h"
@@ -60,8 +60,8 @@ static bool do_shell(const char *command);
6060
/*----------
6161
* HandleSlashCmds:
6262
*
63-
* Handles all the different commands that start with '\',
64-
*ordinarily called by MainLoop().
63+
* Handles all the different commands that start with '\'.
64+
*Ordinarily called by MainLoop().
6565
*
6666
* scan_state is a lexer working state that is set to continue scanning
6767
* just after the '\'. The lexer is advanced past the command and all
@@ -148,6 +148,9 @@ HandleSlashCmds(PsqlScanState scan_state,
148148

149149
free(cmd);
150150

151+
/* some commands write to queryFout, so make sure output is sent */
152+
fflush(pset.queryFout);
153+
151154
returnstatus;
152155
}
153156

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp