pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Gavin Flower <GavinFlower@archidevsys.co.nz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: color by default
Date: Wed, 1 Apr 2020 15:50:42 +0200
Message-ID: <da433a28-6db9-48fc-7631-dfeb76f24392@2ndquadrant.com> (raw)
In-Reply-To: <20200330080346.GF43995@paquier.xyz>
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>
	<afc175cd-902b-3ee9-9cee-f709cadb9c23@2ndquadrant.com>
	<CAC+AXB2fNoHKfO7+bGa_FKg9iqnXfnGxxF5xiaR=3LzL_NJ81A@mail.gmail.com>
	<b89b55f1-6e3a-40d3-8c84-d2ad07d3e10c@2ndquadrant.com>
	<CAC+AXB34Dix9qELXErRgAXPuJgQEExWPmB_W7_oRqM+iVM1y7Q@mail.gmail.com>
	<20200330080346.GF43995@paquier.xyz>

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





view thread (34+ messages)  latest in thread

Message-ID: <da433a28-6db9-48fc-7631-dfeb76f24392@2ndquadrant.com>
Permalink:  ../da433a28-6db9-48fc-7631-dfeb76f24392@2ndquadrant.com/
Also on:    postgresql.org/message-id/da433a28-6db9-48fc-7631-dfeb76f24392@2ndquadrant.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, michael@paquier.xyz, juanjo.santamaria@gmail.com, bruce@momjian.us, tgl@sss.pgh.pa.us, GavinFlower@archidevsys.co.nz, robertmhaas@gmail.com
  Subject: Re: color by default
  In-Reply-To: <da433a28-6db9-48fc-7631-dfeb76f24392@2ndquadrant.com>

* 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