Index: src/bin/psql/common.c
===================================================================
RCS file: /home/neilc/postgres/cvs_root/pgsql/src/bin/psql/common.c,v
retrieving revision 1.134
diff -p -c -r1.134 common.c
*** src/bin/psql/common.c	16 Apr 2007 20:15:38 -0000	1.134
--- src/bin/psql/common.c	20 Jun 2007 22:34:04 -0000
*************** ExecQueryUsingCursor(const char *query, 
*** 1076,1081 ****
--- 1076,1087 ----
  
  		printQuery(results, &my_popt, pset.queryFout, pset.logfile);
  
+ 		/*
+ 		 * Make sure to flush the output stream, so intermediate
+ 		 * results are visible to the client immediately.
+ 		 */
+ 		fflush(pset.queryFout);
+ 
  		/* after the first result set, disallow header decoration */
  		my_popt.topt.start_table = false;
  		my_popt.topt.prior_records += ntuples;
