Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Seems EXPLAIN as SELECT would break our elog() control of output to the
> > server logs.
>
> EXPLAIN as SELECT would mean that the server log is out of the picture
> entirely, which is not necessarily a bad thing. Is there a good reason
> for logging EXPLAIN output? I can't see one other than "we've always
> done it that way".
I can't think of a good reason, but making it a select output makes
EXPLAIN one of the few things you can't get into the server logs, even
if you want to. At DEBUG5, you get almost everything about a query.
Seems you may want to capture EXPLAIN in there too, but because we can
control those with print_* using various SET parameters, I guess it is
OK.
There are other INFO types that are sent to the client that can't be
captured in psql output, like VACUUM VERBOSE. I guess I would rather
see NOTICES go to the \g/\o output file and to the terminal as a fix
that would solve the problem easily.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026