Re: Rationalizing EXPLAIN VERBOSE output

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rationalizing EXPLAIN VERBOSE output
Date: 2002-03-11 02:32:03
Message-ID: 200203110232.g2B2W3a12213@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
> Tom Lane writes:
>
> > What I would suggest is that EXPLAIN VERBOSE ought to emit either
> > non-pretty-print or pretty-print dump format, not both (probably control
> > this with debug_pretty_print or another newly-invented GUC parameter;
> > IMHO the factory default should be pretty-printing).
>
> Sounds good. I think we can reuse the parameter.

Agreed. I like parameter reuse.

> > A disadvantage of elog(INFO) output for pretty-printed plans is that
> > AFAIK psql doesn't currently have any way of capturing NOTICE output
> > into a file. I find it much better to look at pretty-printed dumps
> > in Emacs than on a terminal window, mainly because Emac's M-C-f and
> > M-C-b commands understand the nesting structure so it's easy to move
> > around in the dump with them. How hard would it be to get psql to
> > send notice output into a \g file?
>
> \g (and \o) send only the query results to a file. The idea is that you
> want to save the results, but if there's a warning or error, you want to
> see it. We could add alternative commands (\G and \O?) that save the
> notices and errors as well. Not sure if this is useful beyond this
> application. In non-interactive situations you'd usually use shell
> redirections to save all output.

Could we send notices to the \g, \o file and to the terminal, and send
normal output only to the file? Seems that would make sense.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-03-11 02:33:37 Re: Rationalizing EXPLAIN VERBOSE output
Previous Message Peter Eisentraut 2002-03-11 02:32:02 Re: Allowing usernames in pg_hba.conf