Re: color by default - Mailing list pgsql-hackers

From Juan José Santamaría Flecha
Subject Re: color by default
Date
Msg-id CAC+AXB04-NC6vF=c63EDp1G+c8n4uciZjeKMHY29LkBmZTebHA@mail.gmail.com
Whole thread Raw
In response to Re: color by default  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Responses Re: color by default  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
The patch to improve color support on Windows has been commited [1], and I would like to share some of the discussion there that might affect this patch.

- The documentation/comments could make a better job of explaining the case of PG_COLOR equals 'always', explicitly saying that no checks are done about the output channel.

Aside from the decision about what the default coloring behaviour should be, there are parts of this patch that could be applied independently, as an improvement on the current state.

- The new function terminal_supports_color() should also apply when PG_COLOR is 'auto', to minimize the chances of seeing escape characters in the user terminal.

- 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.

[1] https://www.postgresql.org/message-id/20200302064842.GE32059%40paquier.xyz

Regards,

Juan José Santamaría Flecha

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Crash by targetted recovery
Next
From: legrand legrand
Date:
Subject: Re: Planning counters in pg_stat_statements (using pgss_store)