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

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: "Tang, Haiying" <tanghy(dot)fnst(at)cn(dot)fujitsu(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PG Bug reporting form <noreply(at)postgresql(dot)org>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16108: Colorization to the output of command-line has unproperly behaviors at Windows platform
Date: 2019-11-15 08:14:59
Message-ID: CAC+AXB1yZXb_=DzRoPV8jY0cUX5EFYLHtmOgu7is3d3M31GppQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Thanks for testing. I am opening a new item in the next commitfest for this
topic.

On Fri, Nov 15, 2019 at 5:23 AM Tang, Haiying <tanghy(dot)fnst(at)cn(dot)fujitsu(dot)com>
wrote:

> >In order to make it work both things are needed, setting the console mode
> and a terminal that supports it.
>
>
>
> Your patch worked fine on windows which supports VT100. But the bug still
> happened when set PG_COLOR="always" at Windows Terminal that not support
> VT100. Please see the attached file “Test_result.png” for the NG result. (I
> used win7 for this test)
>
>
> To fix the above bug, I made some change to your patch. The new one works
> fine on my win7(VT100 not support) and win10(VT100 support).
>

My understanding of the "always" logic is that it has to be enabled no
matter what, even if not supported in current output.

Also, in this new patch(v1), I added some doc change for Windows not
> support Colorization. Please find the attached patch for so.
>
>
>
You cannot change the release notes, if anything it will be added to 12.2
patch notes. It should be added to the 21 (!) utilities that specify the
PG_COLOR usage, but I am not so sure that adding a note stating this
feature requires Windows 10 >= 1511 update is really a Postgres business.

Please find attached a version that supports older Mingw versions and SDKs.

Regards,

Juan José Santamaría Flecha

Attachment Content-Type Size
v2-0001-command-line-colorization-on-windows.patch application/octet-stream 1.2 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Floris Van Nee 2019-11-15 09:01:23 incorrect pg_dump output due to not handling dropped roles correctly
Previous Message Michael Paquier 2019-11-15 08:07:06 Re: REINDEX CONCURRENTLY unexpectedly fails

Browse pgsql-hackers by date

  From Date Subject
Next Message Grigory Smolkin 2019-11-15 08:30:02 Re: pg_upgrade fails with non-standard ACL
Previous Message Pavel Stehule 2019-11-15 07:52:36 Re: dropdb --force