Re: BUG #16108: Colorization to the output of command-line hasunproperly behaviors at Windows platform

Поиск
Список
Период
Сортировка
От Juan José Santamaría Flecha
Тема Re: BUG #16108: Colorization to the output of command-line hasunproperly behaviors at Windows platform
Дата
Msg-id CAC+AXB0LSzuE7veUrw0-N=cxKEV_hfZTT_RaPMfMeRY3co-RQA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #16108: Colorization to the output of command-line hasunproperly behaviors at Windows platform  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Ответы Re: BUG #16108: Colorization to the output of command-line hasunproperly behaviors at Windows platform  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Re: BUG #16108: Colorization to the output of command-line hasunproperly behaviors at Windows platform  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers


On Sat, Feb 22, 2020 at 9:09 PM Michail Nikolaev <michail.nikolaev@gmail.com> wrote:

I am not sure it is good idea to mix both patches because it adds some
confusion and makes it harder to merge each.
Maybe is it better to update current patch the way to reuse some
function later in [1]?

The patch was originaly reported for Windows, but looking into Peter's patch, I think this issue affects other systems unless we use stricter logic to detect a colorable terminal when using the "auto" option. Probably, the way to go is leaving this patch as WIN32 only and thinking about a future patch.
 
Also, regarding comment
> It is disabled by default, so it must be enabled to use color outpout.

It is not true for new terminal, for example. Maybe it is better to
rephrase it to something like: "Check if TV100 support if enabled and
attempt to enable if not".

The logic I have seen on new terminals is that VT100 is supported but disabled. Would you find clearer? "Attempt to enable VT100 sequence processing. If it is not possible consider it as unsupported."

Please find attached a patch addressing these comments.

Regards,

Juan José Santamaría Flecha
Вложения

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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Error on failed COMMIT
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: plan cache overhead on plpgsql expression