33 *
44 * Copyright (c) 2000-2003, PostgreSQL Global Development Group
55 *
6- * $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.58 2003/11/29 19:52:06 pgsql Exp $
6+ * $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.59 2004/01/21 22:05:44 tgl Exp $
77 */
88#include "postgres_fe.h"
99#include "mainloop.h"
@@ -103,7 +103,6 @@ MainLoop(FILE *source)
103103}
104104
105105cancel_pressed = false;
106- fflush (stdout );
107106}
108107
109108#ifndef WIN32
@@ -122,7 +121,6 @@ MainLoop(FILE *source)
122121paren_level = 0 ;
123122count_eof = 0 ;
124123slashCmdStatus = CMD_UNKNOWN ;
125- fflush (stdout );
126124}
127125else
128126{
@@ -138,6 +136,8 @@ MainLoop(FILE *source)
138136pqsignal (SIGINT ,handle_sigint );/* control-C => cancel */
139137#endif /* not WIN32 */
140138
139+ fflush (stdout );
140+
141141if (slashCmdStatus == CMD_NEWEDIT )
142142{
143143/*
@@ -161,8 +161,6 @@ MainLoop(FILE *source)
161161{
162162int prompt_status ;
163163
164- fflush (stdout );
165-
166164if (in_quote && in_quote == '\'' )
167165prompt_status = PROMPT_SINGLEQUOTE ;
168166else if (in_quote && in_quote == '"' )
@@ -181,7 +179,6 @@ MainLoop(FILE *source)
181179else
182180line = gets_fromFile (source );
183181
184-
185182/* Setting this will not have effect until next line. */
186183die_on_error = GetVariableBool (pset .vars ,"ON_ERROR_STOP" );
187184