Add fflush of stdout when outputing query.

This commit is contained in:
Bruce Momjian 2003-07-31 04:23:40 +00:00
parent 82bade79dc
commit f766b376f1
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
TODO list for PostgreSQL TODO list for PostgreSQL
======================== ========================
Last updated: Wed Jul 30 16:23:29 EDT 2003 Last updated: Thu Jul 31 00:20:01 EDT 2003
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
@ -474,7 +474,7 @@ Source Code
* Acquire lock on a relation before building a relcache entry for it * Acquire lock on a relation before building a relcache entry for it
* Research interaction of setitimer() and sleep() used by statement_timeout * Research interaction of setitimer() and sleep() used by statement_timeout
* Add checks for fclose() failure * Add checks for fclose() failure
* Change CVS $Id: TODO,v 1.1100 2003/07/30 20:23:32 momjian Exp $ to $PostgreSQL: pgsql/doc/TODO,v 1.1100 2003/07/30 20:23:32 momjian Exp $ * Change CVS $Id: TODO,v 1.1101 2003/07/31 04:23:40 momjian Exp $ to $PostgreSQL: pgsql/doc/TODO,v 1.1101 2003/07/31 04:23:40 momjian Exp $
* Exit postmaster if postgresql.conf can not be opened * Exit postmaster if postgresql.conf can not be opened
* Rename /scripts directory because they are all C programs now * Rename /scripts directory because they are all C programs now
* Allow the regression tests to start postmaster with -i so the tests * Allow the regression tests to start postmaster with -i so the tests

View File

@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.66 2003/07/23 08:47:39 petere Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.67 2003/07/31 04:23:40 momjian Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
#include "common.h" #include "common.h"
@ -595,7 +595,10 @@ SendQuery(const char *query)
return false; return false;
} }
else if (VariableEquals(pset.vars, "ECHO", "queries")) else if (VariableEquals(pset.vars, "ECHO", "queries"))
{
puts(query); puts(query);
fflush(stdout);
}
SetCancelConn(); SetCancelConn();