Skip to content

Commit f01e3ba

Browse files
committed
doc: Mention more variant --name=value of -c name=value for postgres
postgres --name=value and -c name=value are equivalents. This commit expands the documentation of libpq's "option" connection parameter and the server startup sequence for shell interactions to mention both rather than only -c. Extracted from a larger patch by the same authors. Reported-by: Alexey Palazhchenko Author: David Johnston, Aleksander Alekseev Reviewed-by: Nathan Bossart, Peter Eisentraut, Álvaro Herrera Discussion: https://postgr.es/m/CAJ7c6TMkuLiLfrA+EFCPYfhXoMKRxxssB5c86+ibxfaz6+=Sdg@mail.gmail.com
1 parent 3c03ee1 commit f01e3ba

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

doc/src/sgml/config.sgml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,10 @@ UPDATE pg_settings SET setting = reset_val WHERE name = 'configuration_parameter
334334
<para>
335335
During server startup, parameter settings can be
336336
passed to the <command>postgres</command> command via the
337-
<option>-c</option> command-line parameter. For example,
337+
<option>-c name=value</option> command-line parameter, or its equivalent
338+
<option>--name=value</option> variation. For example,
338339
<programlisting>
339-
postgres -c log_connections=yes -c log_destination='syslog'
340+
postgres -c log_connections=yes --log-destination='syslog'
340341
</programlisting>
341342
Settings provided in this way override those set via
342343
<filename>postgresql.conf</filename> or <command>ALTER SYSTEM</command>,
@@ -353,10 +354,10 @@ postgres -c log_connections=yes -c log_destination='syslog'
353354
of the session, but do not affect other sessions.
354355
For historical reasons, the format of <envar>PGOPTIONS</envar> is
355356
similar to that used when launching the <command>postgres</command>
356-
command; specifically, the <option>-c</option> flag must be specified.
357-
For example,
357+
command; specifically, the <option>-c</option>, or prepended
358+
<literal>--</literal>, before the name must be specified. For example,
358359
<programlisting>
359-
env PGOPTIONS="-c geqo=off -c statement_timeout=5min" psql
360+
env PGOPTIONS="-c geqo=off --statement-timeout=5min" psql
360361
</programlisting>
361362
</para>
362363

doc/src/sgml/libpq.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,9 +1421,10 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
14211421
<listitem>
14221422
<para>
14231423
Specifies command-line options to send to the server at connection
1424-
start. For example, setting this to <literal>-c geqo=off</literal> sets the
1425-
session's value of the <varname>geqo</varname> parameter to
1426-
<literal>off</literal>. Spaces within this string are considered to
1424+
start. For example, setting this to <literal>-c geqo=off</literal>
1425+
or <literal>--geqo=off</literal> sets the session's value of the
1426+
<varname>geqo</varname> parameter to <literal>off</literal>.
1427+
Spaces within this string are considered to
14271428
separate command-line arguments, unless escaped with a backslash
14281429
(<literal>\</literal>); write <literal>\\</literal> to represent a literal
14291430
backslash. For a detailed discussion of the available

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy