Re: psql output locations - Mailing list pgsql-hackers

From Robert Haas
Subject Re: psql output locations
Date
Msg-id CA+TgmoYg5L+NyYLp1ktU=7DpZ7Ff+pD8+_NQBsL1g-198tbWBg@mail.gmail.com
Whole thread Raw
In response to Re: psql output locations  (Magnus Hagander <magnus@hagander.net>)
Responses Re: psql output locations
List pgsql-hackers
On Wed, Dec 14, 2011 at 4:45 AM, Magnus Hagander <magnus@hagander.net> wrote:
>>> * There are a number of things that are always written to stdout, that
>>> there is no way to redirect. In some cases it's interactive prompts -
>>> makes sense - but also for example the output of \timing goes to
>>> stdout always. Is there some specific logic behind what/when this
>>> should be done?
>>
>> Everything that is not an error goes to stdout, no?  Except the query
>> output, if you change it.
>>
>> Maybe the way to do what you want is to invent a new setting that
>> temporarily changes stdout.
>
> Yeah, that might be it. Or I need separate settings for "put errors in
> the query output stream" and "put non-query-output-but-also-non-errors
> in the query output stream". The effect would be the same, I guess...

That seems an awful lot harder (and messier) than just changing the
all the call sites to use the same error-reporting function.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: foreign key locks, 2nd attempt
Next
From: Simon Riggs
Date:
Subject: Re: [REVIEW] pg_last_xact_insert_timestamp