From f766b376f1a4956f878e9cdf54e7ced49a4feaf3 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 31 Jul 2003 04:23:40 +0000 Subject: [PATCH] Add fflush of stdout when outputing query. --- doc/TODO | 4 ++-- src/bin/psql/common.c | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/TODO b/doc/TODO index 7696de85a8..c36ecdd87a 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,6 +1,6 @@ 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) @@ -474,7 +474,7 @@ Source Code * Acquire lock on a relation before building a relcache entry for it * Research interaction of setitimer() and sleep() used by statement_timeout * 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 * Rename /scripts directory because they are all C programs now * Allow the regression tests to start postmaster with -i so the tests diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index 94df950efe..42299129fb 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -3,7 +3,7 @@ * * 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 "common.h" @@ -595,8 +595,11 @@ SendQuery(const char *query) return false; } else if (VariableEquals(pset.vars, "ECHO", "queries")) + { puts(query); - + fflush(stdout); + } + SetCancelConn(); if (PQtransactionStatus(pset.db) == PQTRANS_IDLE && -- 2.40.0