Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAbka-00060W-Es for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Sep 2019 15:20:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iAbkZ-0005Fr-6K for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Sep 2019 15:20:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAbkY-0005Fi-TW for pgsql-hackers@lists.postgresql.org; Wed, 18 Sep 2019 15:20:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAbkS-0004Gf-2S for pgsql-hackers@lists.postgresql.org; Wed, 18 Sep 2019 15:20:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x8IFJupF027856; Wed, 18 Sep 2019 11:19:56 -0400 From: Tom Lane To: Peter Eisentraut cc: Masahiko Sawada , Christoph Berg , PostgreSQL Hackers Subject: Re: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs) In-reply-to: References: <20190409092221.GA1961@msg.df7cb.de> <20190409120112.GC1961@msg.df7cb.de> Comments: In-reply-to Peter Eisentraut message dated "Wed, 18 Sep 2019 13:03:56 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27854.1568819996.1@sss.pgh.pa.us> Date: Wed, 18 Sep 2019 11:19:56 -0400 Message-ID: <27855.1568819996@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut 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