Skip to content

Commit d1724d6

Browse files
committed
reversed julian's patch back in again...othere things cause monitor
to not compile now...
1 parent 7344d69 commit d1724d6

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/bin/monitor/monitor.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* 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 $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -642,6 +642,7 @@ handle_execution(char *query)
642642
{
643643
PGresult *result;
644644
int retval = 0;
645+
PQprintOpt opt;
645646

646647
result = PQexec(conn, query);
647648

@@ -657,11 +658,18 @@ handle_execution(char *query)
657658
break;
658659
case PGRES_TUPLES_OK:
659660
/* PQprintTuples(result,stdout,PrintAttNames,TerseOutput,COLWIDTH); */
660-
if (TerseOutput)
661+
/* if (TerseOutput)
661662
PQdisplayTuples(result,stdout,1,"",PrintAttNames,TerseOutput);
662663
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;
665673
case PGRES_COPY_OUT:
666674
handle_copy_out(result);
667675
break;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy