Re: Updating psql for features of new FE/BE protocol

From: nolan(at)celery(dot)tssi(dot)com
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: pgman(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian), pgsql-hackers(at)postgresql(dot)org
Subject: Re: Updating psql for features of new FE/BE protocol
Date: 2003-06-25 23:55:48
Message-ID: 20030625235548.24169.qmail@celery.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> nolan(at)celery(dot)tssi(dot)com writes:
> > Is it too late to suggest that there be a way to have output displayed
> > on screen AND output to a file?
>
> tee perhaps?

Tee ALMOST does it. Try doing a \d while tee'ing the output, for example.

I don't quite get everything back before it asks for the next input line,
sometimes all that is missing is the prompt itself.

I haven't set up a 7.4 test system yet, but I've been looking into it in
7.3.3. it gives me something fairly harmless to work on as I learn more C.

I think tee may write straight to sysout, so it is probably intermingling
with the writes from within psql. I'm not sure why sometimes it is only
missing a line or two and other times it is missing several lines. There
doesn't appear to be a way to set the popen on the \o command to
non-buffer mode or to force a flush on a pipe. (The equivalent of fflush.)

I have also noticed that if I have timing on, the timing stats do not get
sent to the output file, just to the screen. (That doesn't concern me
at this point, it was just a side comment on screen vs file output.)

> This is irrelevant to what I'm doing, in any case, and it's not an itch
> I feel personally. Work on it yourself if you want it ...

I'm trying to, now I really feel like a rookie! :-)
--
Mike Nolan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-06-26 00:03:44 Re: Updating psql for features of new FE/BE protocol
Previous Message Tom Lane 2003-06-25 23:52:56 Re: [HACKERS] allowed user/db variables