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.92) (envelope-from ) id 1jF7Cm-0002nG-BC for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Mar 2020 02:16: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 1jF7Cl-0002EI-2Z for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Mar 2020 02:16: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 1jF7Ck-0002EB-Q8 for pgsql-hackers@lists.postgresql.org; Fri, 20 Mar 2020 02:16:10 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jF7Ch-00066Q-Co for pgsql-hackers@postgresql.org; Fri, 20 Mar 2020 02:16:10 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jF7CX-0000GS-K1; Thu, 19 Mar 2020 22:15:57 -0400 Date: Thu, 19 Mar 2020 22:15:57 -0400 From: Bruce Momjian To: Michael Paquier Cc: Juan =?iso-8859-1?Q?Jos=E9_Santamar=EDa?= Flecha , Gavin Flower , Robert Haas , Tom Lane , Peter Eisentraut , pgsql-hackers Subject: Re: color by default Message-ID: <20200320021557.GC1850@momjian.us> References: <32117.1577799339@sss.pgh.pa.us> <0e03c747-a48d-912e-325d-5051b593c332@archidevsys.co.nz> <20200106053824.GO3598@paquier.xyz> <171d92f5-fc29-a207-3db9-c16c63bb2ea7@archidevsys.co.nz> <20200303053101.GH32059@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200303053101.GH32059@paquier.xyz> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Mar 3, 2020 at 02:31:01PM +0900, Michael Paquier wrote: > On Mon, Mar 02, 2020 at 01:00:44PM +0100, Juan José Santamaría Flecha wrote: > > - The new entry in the documentation, specially as the PG_COLORS parameter > > seems to be currently undocumented. The programs that can use PG_COLOR > > would benefit from getting a link to it. > > The actual problem here is that we don't have an actual centralized > place where we could put that stuff. And anything able to use this > option is basically anything using src/common/logging.c. > > Regarding PG_COLORS, the commit message of cc8d415 mentions it, but we > have no actual example of how to use it, and the original thread has > zero reference to it: > https://www.postgresql.org/message-id/6a609b43-4f57-7348-6480-bd022f924310@2ndquadrant.com > > And in fact, it took me a while to figure out that using it is a mix > of three keywords ("error", "warning" or "locus") separated by colons > which need to have an equal sign to the color defined. Here is for > example how to make the locus show up in yellow with errors in blue: > export PG_COLORS='error=01;34:locus=01;33' > > Having to dig into the code to find out that stuff is not a good user > experience. And I found out about that only because I worked on a > patch touching this area yesterday. I can confirm there is still no mention of PG_COLORS in our documentation. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +