mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
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
This commit is contained in:
parent
3c03ee1a39
commit
f01e3ba56f
@ -334,9 +334,10 @@ UPDATE pg_settings SET setting = reset_val WHERE name = 'configuration_parameter
|
|||||||
<para>
|
<para>
|
||||||
During server startup, parameter settings can be
|
During server startup, parameter settings can be
|
||||||
passed to the <command>postgres</command> command via the
|
passed to the <command>postgres</command> command via the
|
||||||
<option>-c</option> command-line parameter. For example,
|
<option>-c name=value</option> command-line parameter, or its equivalent
|
||||||
|
<option>--name=value</option> variation. For example,
|
||||||
<programlisting>
|
<programlisting>
|
||||||
postgres -c log_connections=yes -c log_destination='syslog'
|
postgres -c log_connections=yes --log-destination='syslog'
|
||||||
</programlisting>
|
</programlisting>
|
||||||
Settings provided in this way override those set via
|
Settings provided in this way override those set via
|
||||||
<filename>postgresql.conf</filename> or <command>ALTER SYSTEM</command>,
|
<filename>postgresql.conf</filename> or <command>ALTER SYSTEM</command>,
|
||||||
@ -353,10 +354,10 @@ postgres -c log_connections=yes -c log_destination='syslog'
|
|||||||
of the session, but do not affect other sessions.
|
of the session, but do not affect other sessions.
|
||||||
For historical reasons, the format of <envar>PGOPTIONS</envar> is
|
For historical reasons, the format of <envar>PGOPTIONS</envar> is
|
||||||
similar to that used when launching the <command>postgres</command>
|
similar to that used when launching the <command>postgres</command>
|
||||||
command; specifically, the <option>-c</option> flag must be specified.
|
command; specifically, the <option>-c</option>, or prepended
|
||||||
For example,
|
<literal>--</literal>, before the name must be specified. For example,
|
||||||
<programlisting>
|
<programlisting>
|
||||||
env PGOPTIONS="-c geqo=off -c statement_timeout=5min" psql
|
env PGOPTIONS="-c geqo=off --statement-timeout=5min" psql
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -1421,9 +1421,10 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Specifies command-line options to send to the server at connection
|
Specifies command-line options to send to the server at connection
|
||||||
start. For example, setting this to <literal>-c geqo=off</literal> sets the
|
start. For example, setting this to <literal>-c geqo=off</literal>
|
||||||
session's value of the <varname>geqo</varname> parameter to
|
or <literal>--geqo=off</literal> sets the session's value of the
|
||||||
<literal>off</literal>. Spaces within this string are considered to
|
<varname>geqo</varname> parameter to <literal>off</literal>.
|
||||||
|
Spaces within this string are considered to
|
||||||
separate command-line arguments, unless escaped with a backslash
|
separate command-line arguments, unless escaped with a backslash
|
||||||
(<literal>\</literal>); write <literal>\\</literal> to represent a literal
|
(<literal>\</literal>); write <literal>\\</literal> to represent a literal
|
||||||
backslash. For a detailed discussion of the available
|
backslash. For a detailed discussion of the available
|
||||||
|
Loading…
x
Reference in New Issue
Block a user