Re: psql \watch always ignores \pset null

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql \watch always ignores \pset null
Дата
Msg-id 10403.1416378246@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: psql \watch always ignores \pset null  (Will Leinweber <will@heroku.com>)
Ответы Re: psql \watch always ignores \pset null  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
Will Leinweber <will@heroku.com> writes:
> On Tue, Nov 18, 2014 at 9:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Fujii Masao <masao.fujii@gmail.com> writes:
>>> Is there any reason why \watch must ignore \pset null setting?

>> Hmmm ... the comment offers a reasonable argument for forcing pager = 0,
>> but I agree the nullPrint change is not adequately explained.
>> Will, do you remember why you did that?

> I tracked down the individual commit[1] from my history where I added
> that. What I added there is very similar to sections in
> src/bin/psql/describe.c. I can't remember specifically my reasoning
> then, but it's likely I copied the patterns there while getting things
> working.
> I do still think it's important to remove the pager, but the nullPrint
> is probably a mistake.

I took a quick look and noted that the other places where nullPrint is
summarily forced to null are for \d and similar queries.  For those,
the code can reasonably have an opinion about what the presentation should
be like, since it knows what SQL query it's issuing.  That argument surely
doesn't apply to \watch, so I'm in agreement with Fujii that it'd be
better to respect the user's \pset setting.
        regards, tom lane



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

Предыдущее
От: Will Leinweber
Дата:
Сообщение: Re: psql \watch always ignores \pset null
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: postgres_fdw behaves oddly