pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Christoph Berg <myon@debian.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)
Date: Wed, 18 Sep 2019 11:19:56 -0400
Message-ID: <27855.1568819996@sss.pgh.pa.us> (raw)
In-Reply-To: <daa1f509-b1a2-8fc3-4079-305470dfa7b7@2ndquadrant.com>
References: <E1hB1d6-00051m-1s@gemulon.postgresql.org>
	<20190409092221.GA1961@msg.df7cb.de>
	<d483cdb6-db98-9b2f-7f2b-eed0f4bd975d@2ndquadrant.com>
	<20190409120112.GC1961@msg.df7cb.de>
	<CAD21AoDoAZBTf=29PT-cUtFvxYEXi6nAPSzAjCc94q5UXH_6Ug@mail.gmail.com>
	<daa1f509-b1a2-8fc3-4079-305470dfa7b7@2ndquadrant.com>

Peter Eisentraut <peter.eisentraut@2ndquadrant.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





view thread (7+ messages)  latest in thread

Message-ID: <27855.1568819996@sss.pgh.pa.us>
Permalink:  ../27855.1568819996@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27855.1568819996@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, sawada.mshk@gmail.com, myon@debian.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)
  In-Reply-To: <27855.1568819996@sss.pgh.pa.us>
  References: <E1hB1d6-00051m-1s@gemulon.postgresql.org> <20190409092221.GA1961@msg.df7cb.de> <d483cdb6-db98-9b2f-7f2b-eed0f4bd975d@2ndquadrant.com> <20190409120112.GC1961@msg.df7cb.de> <CAD21AoDoAZBTf=29PT-cUtFvxYEXi6nAPSzAjCc94q5UXH_6Ug@mail.gmail.com> <daa1f509-b1a2-8fc3-4079-305470dfa7b7@2ndquadrant.com> <27855.1568819996@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox