PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)

From: Christoph Berg <myon(at)debian(dot)org>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)
Date: 2019-04-09 09:22:21
Message-ID: 20190409092221.GA1961@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Re: Peter Eisentraut 2019-04-01 <E1hB1d6-00051m-1s(at)gemulon(dot)postgresql(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2019-04-09 10:55:22 Re: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)
Previous Message Heikki Linnakangas 2019-04-09 05:34:28 pgsql: Fix example in comment.

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2019-04-09 09:41:43 Re: Status of the table access method work
Previous Message Amit Langote 2019-04-09 09:19:49 more isolation tests for update tuple routing