Re: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Christoph Berg <myon(at)debian(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)
Date: 2019-09-18 15:19:56
Message-ID: 27855.1568819996@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> On 2019-06-06 11:08, Masahiko Sawada wrote:
>>> Do we need two variables to control this? I was only looking at
>>> PG_COLOR, and noticed PG_COLORS only later. Keeping PG_COLORS aligned
>>> with {GCC,LS}_COLORS makes sense. How about removing PG_COLOR, and
>>> making "auto" the default? (Maybe we could still support "PG_COLORS=off")

>> I think the if we keep two variables user can set the same value to
>> both GCC_COLORS and PG_COLORS. Rather I think it's a problem that
>> there is no documentation of PG_COLORS. Thoughts?

> It looks like there is documentation for PG_COLORS in the release notes
> now, which seems like an odd place. Suggestions for a better place?

I stuck that in because Bruce's text didn't make any sense to me,
so I went and read the code to see what it was actually doing.
I didn't know that it hadn't been correctly documented in the first
place ;-)

I'm not for forcing "auto" mode all the time; that will surely break
things for some people. So I think the behavior is fine and
we should just fix the docs. (Possibly my opinion is biased here
by the fact that I hate all forms of colorized output with a deep,
abiding passion, as Robert would put it. So off-by-default is just
fine with me.)

> And any more opinions for PG_COLORS vs PGCOLORS naming?

Following the precedent of LS_COLORS makes sense from here.

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2019-09-18 19:35:46 pgsql: Fix testlibpq3
Previous Message Alvaro Herrera 2019-09-18 14:33:45 pgsql: pg_upgrade/test.sh: Quote sed(1) argument

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2019-09-18 15:29:54 Re: Fix parsing of identifiers in jsonpath
Previous Message Nikita Glukhov 2019-09-18 15:10:27 Fix parsing of identifiers in jsonpath