On Wed, Mar 04, 2020 at 10:05:30PM +0900, Michael Paquier wrote: > On Wed, Mar 04, 2020 at 11:31:27AM +0100, Fabien COELHO wrote: >> For "pgbench", you could also add the standard sentence that it uses libpq >> environment variables, as it is also missing? > > Yeah, that's true. Let's fix this part while on it.
So, combining the feedback from Fabien, Juan and Daniel I am finishing with the attached. Any thoughts? -- Michael
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index f41084d2db..88da25167a 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -2279,7 +2279,6 @@ main(int argc, char **argv)
int c;
pgpid_t killproc = 0;
- pg_logging_init(argv[0]);
progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_ctl"));
start_time = time(NULL);
diff --git a/doc/src/sgml/oid2name.sgml b/doc/src/sgml/oid2name.sgml
index c7ebd61c6b..acb7ee757f 100644
--- a/doc/src/sgml/oid2name.sgml
+++ b/doc/src/sgml/oid2name.sgml
@@ -223,6 +223,13 @@
utilities, also uses the environment variables supported by
<application>libpq</application> (see <xref linkend="libpq-envars"/>).
</para>
+
+ <para>
+ The environment variable <envar>PG_COLOR</envar> specifies whether to use
+ color in diagnostics messages. Possible values are
+ <literal>always</literal>, <literal>auto</literal> and
+ <literal>never</literal>.
+ </para>
</refsect1>
<refsect1>
diff --git a/doc/src/sgml/ref/clusterdb.sgml b/doc/src/sgml/ref/clusterdb.sgml
index b25845ffc6..0633a42981 100644
--- a/doc/src/sgml/ref/clusterdb.sgml
+++ b/doc/src/sgml/ref/clusterdb.sgml
@@ -279,8 +279,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/createdb.sgml b/doc/src/sgml/ref/createdb.sgml
index 8fc8128bf9..b10216d154 100644
--- a/doc/src/sgml/ref/createdb.sgml
+++ b/doc/src/sgml/ref/createdb.sgml
@@ -327,8 +327,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml
index abe25f17d0..d2349d3aca 100644
--- a/doc/src/sgml/ref/createuser.sgml
+++ b/doc/src/sgml/ref/createuser.sgml
@@ -405,8 +405,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/dropdb.sgml b/doc/src/sgml/ref/dropdb.sgml
index f79bbb9a85..e4daa4f37d 100644
--- a/doc/src/sgml/ref/dropdb.sgml
+++ b/doc/src/sgml/ref/dropdb.sgml
@@ -245,8 +245,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/dropuser.sgml b/doc/src/sgml/ref/dropuser.sgml
index 72bb7e8535..c1c9a68264 100644
--- a/doc/src/sgml/ref/dropuser.sgml
+++ b/doc/src/sgml/ref/dropuser.sgml
@@ -225,8 +225,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index da5c8f5307..16941df3c8 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -466,8 +466,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index fc9ba2e8b0..ed1706208d 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -706,8 +706,8 @@ PostgreSQL documentation
<para>
The environment variable <envar>PG_COLOR</envar> specifies whether to use
- color in diagnostics messages. Possible values are
- <literal>always</literal>, <literal>auto</literal>,
+ color in diagnostics messages. Possible values are
+ <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</refsect1>
diff --git a/doc/src/sgml/ref/pg_checksums.sgml b/doc/src/sgml/ref/pg_checksums.sgml
index 162bafdb33..9127c2251f 100644
--- a/doc/src/sgml/ref/pg_checksums.sgml
+++ b/doc/src/sgml/ref/pg_checksums.sgml
@@ -191,8 +191,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/pg_controldata.sgml b/doc/src/sgml/ref/pg_controldata.sgml
index abac59aa50..f127e52a6a 100644
--- a/doc/src/sgml/ref/pg_controldata.sgml
+++ b/doc/src/sgml/ref/pg_controldata.sgml
@@ -73,8 +73,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 4bcd4bdaef..2abc8bbc79 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -1229,8 +1229,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index 7268be9f3e..ae1940843a 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -701,8 +701,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/pg_isready.sgml b/doc/src/sgml/ref/pg_isready.sgml
index 68447b5093..3d2de0e3bb 100644
--- a/doc/src/sgml/ref/pg_isready.sgml
+++ b/doc/src/sgml/ref/pg_isready.sgml
@@ -167,8 +167,8 @@ PostgreSQL documentation
<para>
The environment variable <envar>PG_COLOR</envar> specifies whether to use
- color in diagnostics messages. Possible values are
- <literal>always</literal>, <literal>auto</literal>,
+ color in diagnostics messages. Possible values are
+ <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</refsect1>
diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
index 177e9211c0..a1bb7fc14e 100644
--- a/doc/src/sgml/ref/pg_receivewal.sgml
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -420,8 +420,8 @@ PostgreSQL documentation
<para>
The environment variable <envar>PG_COLOR</envar> specifies whether to use
- color in diagnostics messages. Possible values are
- <literal>always</literal>, <literal>auto</literal>,
+ color in diagnostics messages. Possible values are
+ <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</refsect1>
diff --git a/doc/src/sgml/ref/pg_recvlogical.sgml b/doc/src/sgml/ref/pg_recvlogical.sgml
index 4c79f90414..ddc31374c1 100644
--- a/doc/src/sgml/ref/pg_recvlogical.sgml
+++ b/doc/src/sgml/ref/pg_recvlogical.sgml
@@ -400,8 +400,8 @@ PostgreSQL documentation
<para>
The environment variable <envar>PG_COLOR</envar> specifies whether to use
- color in diagnostics messages. Possible values are
- <literal>always</literal>, <literal>auto</literal>,
+ color in diagnostics messages. Possible values are
+ <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</refsect1>
diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml
index 8a9e22d050..eb032341f8 100644
--- a/doc/src/sgml/ref/pg_resetwal.sgml
+++ b/doc/src/sgml/ref/pg_resetwal.sgml
@@ -328,8 +328,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml
index c6013546a0..b86e9cb9bc 100644
--- a/doc/src/sgml/ref/pg_restore.sgml
+++ b/doc/src/sgml/ref/pg_restore.sgml
@@ -827,8 +827,8 @@
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml
index 42d29edd4e..cd24fd2fc0 100644
--- a/doc/src/sgml/ref/pg_rewind.sgml
+++ b/doc/src/sgml/ref/pg_rewind.sgml
@@ -269,8 +269,8 @@ PostgreSQL documentation
<para>
The environment variable <envar>PG_COLOR</envar> specifies whether to use
- color in diagnostics messages. Possible values are
- <literal>always</literal>, <literal>auto</literal>,
+ color in diagnostics messages. Possible values are
+ <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</refsect1>
diff --git a/doc/src/sgml/ref/pg_waldump.sgml b/doc/src/sgml/ref/pg_waldump.sgml
index 329c10e430..90e7c7eda1 100644
--- a/doc/src/sgml/ref/pg_waldump.sgml
+++ b/doc/src/sgml/ref/pg_waldump.sgml
@@ -223,8 +223,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/pgarchivecleanup.sgml b/doc/src/sgml/ref/pgarchivecleanup.sgml
index a3d3538b28..fb1762a5d6 100644
--- a/doc/src/sgml/ref/pgarchivecleanup.sgml
+++ b/doc/src/sgml/ref/pgarchivecleanup.sgml
@@ -147,6 +147,18 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E"
</para>
</refsect1>
+ <refsect1>
+ <title>Environment</title>
+
+ <para>
+ The environment variable <envar>PG_COLOR</envar> specifies whether to use
+ color in diagnostics messages. Possible values are
+ <literal>always</literal>, <literal>auto</literal> and
+ <literal>never</literal>.
+ </para>
+ </refsect1>
+
+
<refsect1>
<title>Notes</title>
diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml
index 4c48a58ed2..e09b829cec 100644
--- a/doc/src/sgml/ref/pgbench.sgml
+++ b/doc/src/sgml/ref/pgbench.sgml
@@ -883,6 +883,37 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
</para>
</refsect1>
+ <refsect1>
+ <title>Environment</title>
+
+ <variablelist>
+ <varlistentry>
+ <term><envar>PGHOST</envar></term>
+ <term><envar>PGPORT</envar></term>
+ <term><envar>PGUSER</envar></term>
+
+ <listitem>
+ <para>
+ Default connection parameters.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ This utility, like most other <productname>PostgreSQL</productname> utilities,
+ uses the environment variables supported by <application>libpq</application>
+ (see <xref linkend="libpq-envars"/>).
+ </para>
+
+ <para>
+ The environment variable <envar>PG_COLOR</envar> specifies whether to use
+ color in diagnostics messages. Possible values are
+ <literal>always</literal>, <literal>auto</literal> and
+ <literal>never</literal>.
+ </para>
+ </refsect1>
+
<refsect1>
<title>Notes</title>
diff --git a/doc/src/sgml/ref/pgtestfsync.sgml b/doc/src/sgml/ref/pgtestfsync.sgml
index 501157cb36..a01a9a7ce3 100644
--- a/doc/src/sgml/ref/pgtestfsync.sgml
+++ b/doc/src/sgml/ref/pgtestfsync.sgml
@@ -103,6 +103,17 @@
</refsect1>
+ <refsect1>
+ <title>Environment</title>
+
+ <para>
+ The environment variable <envar>PG_COLOR</envar> specifies whether to use
+ color in diagnostics messages. Possible values are
+ <literal>always</literal>, <literal>auto</literal> and
+ <literal>never</literal>.
+ </para>
+ </refsect1>
+
<refsect1>
<title>See Also</title>
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 20ba105160..3729930b92 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -4410,8 +4410,8 @@ $endif
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/reindexdb.sgml b/doc/src/sgml/ref/reindexdb.sgml
index 5e21fbcc4e..f3e0cabe11 100644
--- a/doc/src/sgml/ref/reindexdb.sgml
+++ b/doc/src/sgml/ref/reindexdb.sgml
@@ -380,8 +380,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml
index 775c9ec651..05c841f8ba 100644
--- a/doc/src/sgml/ref/vacuumdb.sgml
+++ b/doc/src/sgml/ref/vacuumdb.sgml
@@ -474,8 +474,8 @@ PostgreSQL documentation
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
- Specifies whether to use color in diagnostics messages. Possible values
- are <literal>always</literal>, <literal>auto</literal>,
+ Specifies whether to use color in diagnostics messages. Possible values
+ are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
diff --git a/doc/src/sgml/vacuumlo.sgml b/doc/src/sgml/vacuumlo.sgml
index 0b57a77af4..a9ead76635 100644
--- a/doc/src/sgml/vacuumlo.sgml
+++ b/doc/src/sgml/vacuumlo.sgml
@@ -196,6 +196,13 @@
also uses the environment variables supported by <application>libpq</application>
(see <xref linkend="libpq-envars"/>).
</para>
+
+ <para>
+ The environment variable <envar>PG_COLOR</envar> specifies whether to use
+ color in diagnostics messages. Possible values are
+ <literal>always</literal>, <literal>auto</literal> and
+ <literal>never</literal>.
+ </para>
</refsect1>
<refsect1>
signature.asc
Description: PGP signature
