Re: pg_dump output goes to stderr, not stdout?!?

Поиск
Список
Период
Сортировка
От Damian C
Тема Re: pg_dump output goes to stderr, not stdout?!?
Дата
Msg-id 2bbc8f530608201834r43cd9012wdcff5146d262f6ec@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_dump output goes to stderr, not stdout?!?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Tom,

Very clear and dare I say obvious!!

I do check the process exit code already, so I'll ignore stderr and
stdout commentary, and use the exit code to track success, or reasons
for failure.

Many thanks,
-Damian.



On 8/21/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Damian C" <jamianb@gmail.com> writes:
> > QuestionOne: Should this output go to sdout, and NOT to stderr???
>
> No, because what normally goes to stdout is the dump data proper.
> Commentary has to be sent to stderr to keep it separate.
>
> As a general rule I don't think programs should have to read other
> programs' stderr output at all --- certainly not for "did it work or
> not" questions.  What you ought to be doing is looking at pg_dump's
> process exit code to find out whether it had a problem or not.
>
> As for whether it's worth logging the stderr output for human
> inspection: probably, but don't use -v.  -v is *intended* to
> create a lot of normally-useless chatter.
>
>                         regards, tom lane
>

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump output goes to stderr, not stdout?!?
Следующее
От: "ben sewell"
Дата:
Сообщение: Postgresq 8,1 hangs when running function