7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/bin/monitor/Attic/monitor.c,v 1.3 1996/07/22 05:59:53 scrappy Exp $
10
+ * $Header: /cvsroot/pgsql/src/bin/monitor/Attic/monitor.c,v 1.4 1996/07/23 02:26:41 scrappy Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -642,6 +642,7 @@ handle_execution(char *query)
642
642
{
643
643
PGresult * result ;
644
644
int retval = 0 ;
645
+ PQprintOpt opt ;
645
646
646
647
result = PQexec (conn ,query );
647
648
@@ -657,11 +658,18 @@ handle_execution(char *query)
657
658
break ;
658
659
case PGRES_TUPLES_OK :
659
660
/*PQprintTuples(result,stdout,PrintAttNames,TerseOutput,COLWIDTH); */
660
- if (TerseOutput )
661
+ /* if (TerseOutput)
661
662
PQdisplayTuples(result,stdout,1,"",PrintAttNames,TerseOutput);
662
663
else
663
- PQdisplayTuples (result ,stdout ,1 ,"|" ,PrintAttNames ,TerseOutput );
664
- break ;
664
+ PQdisplayTuples(result,stdout,1,"|",PrintAttNames,TerseOutput); */
665
+ memset (& opt ,0 ,sizeof opt );
666
+ opt .header = opt .align = opt .standard = 1 ;
667
+ if (TerseOutput )
668
+ opt .fieldSep = "" ;
669
+ else
670
+ opt .fieldSep = "|" ;
671
+ PQprint (stdout ,result ,& opt );
672
+ break ;
665
673
case PGRES_COPY_OUT :
666
674
handle_copy_out (result );
667
675
break ;