Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJdlc-0002uf-0a for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2020 13:50:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJdla-0000oZ-Tv for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2020 13:50:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJdla-0000n0-Ml for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2020 13:50:50 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJdlX-00081F-VU for pgsql-hackers@postgresql.org; Wed, 01 Apr 2020 13:50:50 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 559325C0325; Wed, 1 Apr 2020 09:50:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 01 Apr 2020 09:50:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=f5XuMF7Pi87O14kMdpDCPXF8JTxWS9MKFKq+4eL0a ls=; b=tTy7xtP2gNvxV3HOHcz17T4yelCaT/NoxcUpDCUtvVpULOEHSvYTaupNz vWbOgMzcVSG2uEM0ytLimJf4rd1x/0NRuP1pwi6X9n1qR/ZhpKb6p/tyYA9PPDJL x1VDkRblSC8DMRvWFHR88DfhhlqYvBy7taMb8lE6h+IKQA4+ng5CrFeHbey/RDtO jd5ojX/H0C9yGyBzeiKK0CNHtoJTmqZoSU73Kut/Ab9QCaoCpRh50fjZ1SJ2fTpJ 68OqDYykLauJgIZHzIvvrA73ma0+DgyCN4YIWAqIvez2M1uxTtXcHCGr5hSgbaDj vQQ00OSqia+TflQ1hH+6sx0agH9xQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrtddvgdeikecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhfhokffffgggjggtgfesthekredttdefheenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsedvnhguqh hurggurhgrnhhtrdgtohhmqeenucffohhmrghinhepvdhnughquhgrughrrghnthdrtgho mhenucfkphepleefrddvgedvrddvudefrddvgedunecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhhtsedv nhguqhhurggurhgrnhhtrdgtohhm X-ME-Proxy: Received: from april.pezone.net (p5df2d5f1.dip0.t-ipconnect.de [93.242.213.241]) by mail.messagingengine.com (Postfix) with ESMTPA id 9D632306CC95; Wed, 1 Apr 2020 09:50:43 -0400 (EDT) Subject: Re: color by default To: Michael Paquier , =?UTF-8?Q?Juan_Jos=c3=a9_Santamar=c3=ada_Flecha?= References: <20200303053101.GH32059@paquier.xyz> <20200320021557.GC1850@momjian.us> <20200321025522.GD10066@momjian.us> <6707.1584760507@sss.pgh.pa.us> <20200321032207.GE10066@momjian.us> <20200323050410.GE2900@paquier.xyz> <20200330080346.GF43995@paquier.xyz> Cc: Bruce Momjian , Tom Lane , Gavin Flower , Robert Haas , pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Wed, 1 Apr 2020 15:50:42 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200330080346.GF43995@paquier.xyz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-03-30 10:03, Michael Paquier wrote: > On Sun, Mar 29, 2020 at 02:55:37PM +0200, Juan José Santamaría Flecha wrote: >> Add it to the tests done when PG_COLOR is "auto". > > FWIW, I am not sure that it is a good idea to stick into the code > knowledge inherent to TERM. That would likely rot depending on how > terminals evolve in the future, and it is easy to test if a terminal > supports color or not but just switching PG_COLOR in a given > environment and look at the error message produced by anything > able to support coloring. There could be some value in this, I think. Other systems also do this in some variant. However, it's unclear to me to what extent this is legacy behavior or driven by current needs. I'd be willing to refine this, but it should be based on some actual needs. What terminals (or terminal-like things) don't support color, and how do we detect them? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services