PGCOLOR? (Re: pgsql: Unified logging system for command-lineprograms) - Mailing list pgsql-hackers

From Christoph Berg
Subject PGCOLOR? (Re: pgsql: Unified logging system for command-lineprograms)
Date
Msg-id 20190409092221.GA1961@msg.df7cb.de
Whole thread Raw
Responses Re: PGCOLOR? (Re: pgsql: Unified logging system for command-lineprograms)
List pgsql-hackers
Re: Peter Eisentraut 2019-04-01 <E1hB1d6-00051m-1s@gemulon.postgresql.org>
> - Some color in the messages, similar to gcc and clang.  Set
>   PG_COLOR=auto to try it out.  Some colors are predefined, but can be
>   customized by setting PG_COLORS.

Can we rename PG_COLOR to PGCOLOR? This is the only PG* environment
variable prefixed with the extra underscore, and remembering that will
be confusing. (Like pgbench should really be named pg_bench for
consistency.) Even if it's not a libpq variable, but that's an
implementation detail that users shouldn't have to worry about.

From reindexdb(1):

NAME
       reindexdb - reindex a PostgreSQL database

ENVIRONMENT
       PGDATABASE
       PGHOST
       PGPORT
       PGUSER
           Default connection parameters

       PG_COLOR
           Specifies whether to use color in diagnostics messages. Possible values are always, auto, never.

Also, why doesn't this default to 'auto'? Lots of programs have moved
to using colors by default over the last years, including git and gcc.

Christoph



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: more isolation tests for update tuple routing
Next
From: Thomas Munro
Date:
Subject: Re: Status of the table access method work