aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-12-28 00:29:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-12-28 00:29:13 +0000
commit3a7f5459d7e4b6ab85ec624c1bd94962707cde5b (patch)
treeefa34dc63974a42869c71e345506ab17af46aa57 /src
parent36b870623698332144c73e950d6a8f91e883d708 (diff)
downloadpostgresql-3a7f5459d7e4b6ab85ec624c1bd94962707cde5b.tar.gz
postgresql-3a7f5459d7e4b6ab85ec624c1bd94962707cde5b.zip
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 for backslash commands too. Per gripe from Rajesh Kumar Mallah.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/command.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 4f87fe45f73..91de2412b7a 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.175 2006/12/16 00:38:43 adunstan Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.176 2006/12/28 00:29:13 tgl Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -60,8 +60,8 @@ static bool do_shell(const char *command);
/*----------
* HandleSlashCmds:
*
- * Handles all the different commands that start with '\',
- * ordinarily called by MainLoop().
+ * Handles all the different commands that start with '\'.
+ * Ordinarily called by MainLoop().
*
* scan_state is a lexer working state that is set to continue scanning
* just after the '\'. The lexer is advanced past the command and all
@@ -148,6 +148,9 @@ HandleSlashCmds(PsqlScanState scan_state,
free(cmd);
+ /* some commands write to queryFout, so make sure output is sent */
+ fflush(pset.queryFout);
+
return status;
}