Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1a9388b

Browse files
committed
doc: libpq connection options can override command-line flags
Reported-by: Alexander LakhinDiscussion:https://postgr.es/m/16486-b9c93d71c02c4907@postgresql.orgBackpatch-through: 9.5
1 parent472e518 commit1a9388b

11 files changed

+53
-47
lines changed

‎doc/src/sgml/ref/clusterdb.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ PostgreSQL documentation
9595
<option>--all</option>) is not used, the database name is read
9696
from the environment variable <envar>PGDATABASE</envar>. If
9797
that is not set, the user name specified for the connection is
98-
used.
98+
used. The <replaceable>dbname</replaceable> can be a <link
99+
linkend="libpq-connstring">connection string</link>. If so,
100+
connection string parameters will override any conflicting command
101+
line options.
99102
</para>
100103
</listitem>
101104
</varlistentry>

‎doc/src/sgml/ref/pg_basebackup.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,8 +653,9 @@ PostgreSQL documentation
653653
<term><option>--dbname=<replaceable class="parameter">connstr</replaceable></option></term>
654654
<listitem>
655655
<para>
656-
Specifies parameters used to connect to the server, as a connection
657-
string. See <xref linkend="libpq-connstring"/> for more information.
656+
Specifies parameters used to connect to the server, as a <link
657+
linkend="libpq-connstring">connction string</link>; these
658+
will override any conflicting command line options.
658659
</para>
659660
<para>
660661
The option is called <literal>--dbname</literal> for consistency with other

‎doc/src/sgml/ref/pg_dump.sgml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,14 +1132,10 @@ PostgreSQL documentation
11321132
Specifies the name of the database to connect to. This is
11331133
equivalent to specifying <replaceable
11341134
class="parameter">dbname</replaceable> as the first non-option
1135-
argument on the command line.
1136-
</para>
1137-
<para>
1138-
If this parameter contains an <symbol>=</symbol> sign or starts
1139-
with a valid <acronym>URI</acronym> prefix
1140-
(<literal>postgresql://</literal>
1141-
or <literal>postgres://</literal>), it is treated as a
1142-
<parameter>conninfo</parameter> string. See <xref linkend="libpq-connect"/> for more information.
1135+
argument on the command line. The <replaceable>dbname</replaceable>
1136+
can be a <link linkend="libpq-connstring">connection string</link>.
1137+
If so, connection string parameters will override any conflicting
1138+
command line options.
11431139
</para>
11441140
</listitem>
11451141
</varlistentry>

‎doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,9 @@ PostgreSQL documentation
552552
<term><option>--dbname=<replaceable class="parameter">connstr</replaceable></option></term>
553553
<listitem>
554554
<para>
555-
Specifies parameters used to connect to the server, as a connection
556-
string. See <xref linkend="libpq-connstring"/> for more information.
555+
Specifies parameters used to connect to the server, as a <link
556+
linkend="libpq-connstring">connction string</link>; these
557+
will override any conflicting command line options.
557558
</para>
558559
<para>
559560
The option is called <literal>--dbname</literal> for consistency with other

‎doc/src/sgml/ref/pg_isready.sgml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,11 @@ PostgreSQL documentation
4747
<term><option>--dbname=<replaceable class="parameter">dbname</replaceable></option></term>
4848
<listitem>
4949
<para>
50-
Specifies the name of the database to connect to.
51-
</para>
52-
<para>
53-
If this parameter contains an <symbol>=</symbol> sign or starts
54-
with a valid <acronym>URI</acronym> prefix
55-
(<literal>postgresql://</literal>
56-
or <literal>postgres://</literal>), it is treated as a
57-
<parameter>conninfo</parameter> string. See <xref
58-
linkend="libpq-connstring"/> for more information.
50+
Specifies the name of the database to connect to. The
51+
<replaceable>dbname</replaceable> can be a <link
52+
linkend="libpq-connstring">connection string</link>. If so,
53+
connection string parameters will override any conflicting command
54+
line options.
5955
</para>
6056
</listitem>
6157
</varlistentry>

‎doc/src/sgml/ref/pg_receivewal.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,9 @@ PostgreSQL documentation
252252
<term><option>--dbname=<replaceable class="parameter">connstr</replaceable></option></term>
253253
<listitem>
254254
<para>
255-
Specifies parameters used to connect to the server, as a connection
256-
string. See <xref linkend="libpq-connstring"/> for more information.
255+
Specifies parameters used to connect to the server, as a <link
256+
linkend="libpq-connstring">connction string</link>; these
257+
will override any conflicting command line options.
257258
</para>
258259
<para>
259260
The option is called <literal>--dbname</literal> for consistency with other

‎doc/src/sgml/ref/pg_recvlogical.sgml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,16 @@ PostgreSQL documentation
273273

274274
<variablelist>
275275
<varlistentry>
276-
<term><option>-d <replaceable>database</replaceable></option></term>
277-
<term><option>--dbname=<replaceable>database</replaceable></option></term>
276+
<term><option>-d <replaceable>dbname</replaceable></option></term>
277+
<term><option>--dbname=<replaceable>dbname</replaceable></option></term>
278278
<listitem>
279279
<para>
280-
The database to connect to. See the description of the actions for
281-
what this means in detail. This can be a <application>libpq</application> connection string;
282-
see <xref linkend="libpq-connstring"/> for more information. Defaults
283-
to user name.
280+
The database to connect to. See the description
281+
of the actions for what this means in detail.
282+
The <replaceable>dbname</replaceable> can be a <link
283+
linkend="libpq-connstring">connection string</link>. If so,
284+
connection string parameters will override any conflicting
285+
command line options. Defaults to the user name.
284286
</para>
285287
</listitem>
286288
</varlistentry>

‎doc/src/sgml/ref/pg_restore.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ PostgreSQL documentation
156156
<para>
157157
Connect to database <replaceable
158158
class="parameter">dbname</replaceable> and restore directly
159-
into the database.
159+
into the database. The <replaceable>dbname</replaceable> can
160+
be a <link linkend="libpq-connstring">connection string</link>.
161+
If so, connection string parameters will override any conflicting
162+
command line options.
160163
</para>
161164
</listitem>
162165
</varlistentry>

‎doc/src/sgml/ref/psql-ref.sgml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,10 @@ EOF
168168
Specifies the name of the database to connect to. This is
169169
equivalent to specifying <replaceable
170170
class="parameter">dbname</replaceable> as the first non-option
171-
argument on the command line.
172-
</para>
173-
<para>
174-
If this parameter contains an <symbol>=</symbol> sign or starts
175-
with a valid <acronym>URI</acronym> prefix
176-
(<literal>postgresql://</literal>
177-
or <literal>postgres://</literal>), it is treated as a
178-
<parameter>conninfo</parameter> string. See <xref
179-
linkend="libpq-connstring"/> for more information.
171+
argument on the command line. The <replaceable>dbname</replaceable>
172+
can be a <link linkend="libpq-connstring">connection string</link>.
173+
If so, connection string parameters will override any conflicting
174+
command line options.
180175
</para>
181176
</listitem>
182177
</varlistentry>
@@ -498,7 +493,7 @@ EOF
498493
<listitem>
499494
<para>
500495
Never issue a password prompt. If the server requires password
501-
authentication and a password is not availableby othermeans
496+
authentication and a password is not availablefrom othersources
502497
such as a <filename>.pgpass</filename> file, the connection
503498
attempt will fail. This option can be useful in batch jobs and
504499
scripts where no user is present to enter a password.
@@ -518,13 +513,15 @@ EOF
518513
<listitem>
519514
<para>
520515
Force <application>psql</application> to prompt for a
521-
password before connecting to a database.
516+
password before connecting to a database, even if the password will
517+
not be used.
522518
</para>
523519

524520
<para>
525-
This option is never essential, since <application>psql</application>
526-
will automatically prompt for a password if the server demands
527-
password authentication. However, <application>psql</application>
521+
If the server requires password authentication and a password is not
522+
available from other sources such as a <filename>.pgpass</filename>
523+
file, <application>psql</application> will prompt for a
524+
password in any case. However, <application>psql</application>
528525
will waste a connection attempt finding out that the server wants a
529526
password. In some cases it is worth typing <option>-W</option> to avoid
530527
the extra connection attempt.

‎doc/src/sgml/ref/reindexdb.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ PostgreSQL documentation
139139
<option>--all</option>) is not used, the database name is read
140140
from the environment variable <envar>PGDATABASE</envar>. If
141141
that is not set, the user name specified for the connection is
142-
used.
142+
used. The <replaceable>dbname</replaceable> can be a <link
143+
linkend="libpq-connstring">connection string</link>. If so,
144+
connection string parameters will override any conflicting command
145+
line options.
143146
</para>
144147
</listitem>
145148
</varlistentry>

‎doc/src/sgml/ref/vacuumdb.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ PostgreSQL documentation
9797
<option>--all</option>) is not used, the database name is read
9898
from the environment variable <envar>PGDATABASE</envar>. If
9999
that is not set, the user name specified for the connection is
100-
used.
100+
used. The <replaceable>dbname</replaceable> can be a <link
101+
linkend="libpq-connstring">connection string</link>. If so,
102+
connection string parameters will override any conflicting command
103+
line options.
101104
</para>
102105
</listitem>
103106
</varlistentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp