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

Commit62f6f11

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 parent8075f3f commit62f6f11

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
@@ -548,8 +548,9 @@ PostgreSQL documentation
548548
<term><option>--dbname=<replaceable class="parameter">connstr</replaceable></option></term>
549549
<listitem>
550550
<para>
551-
Specifies parameters used to connect to the server, as a connection
552-
string. See <xref linkend="libpq-connstring"/> for more information.
551+
Specifies parameters used to connect to the server, as a <link
552+
linkend="libpq-connstring">connction string</link>; these
553+
will override any conflicting command line options.
553554
</para>
554555
<para>
555556
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
@@ -1101,14 +1101,10 @@ PostgreSQL documentation
11011101
Specifies the name of the database to connect to. This is
11021102
equivalent to specifying <replaceable
11031103
class="parameter">dbname</replaceable> as the first non-option
1104-
argument on the command line.
1105-
</para>
1106-
<para>
1107-
If this parameter contains an <symbol>=</symbol> sign or starts
1108-
with a valid <acronym>URI</acronym> prefix
1109-
(<literal>postgresql://</literal>
1110-
or <literal>postgres://</literal>), it is treated as a
1111-
<parameter>conninfo</parameter> string. See <xref linkend="libpq-connect"/> for more information.
1104+
argument on the command line. The <replaceable>dbname</replaceable>
1105+
can be a <link linkend="libpq-connstring">connection string</link>.
1106+
If so, connection string parameters will override any conflicting
1107+
command line options.
11121108
</para>
11131109
</listitem>
11141110
</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
@@ -253,8 +253,9 @@ PostgreSQL documentation
253253
<term><option>--dbname=<replaceable class="parameter">connstr</replaceable></option></term>
254254
<listitem>
255255
<para>
256-
Specifies parameters used to connect to the server, as a connection
257-
string. See <xref linkend="libpq-connstring"/> for more information.
256+
Specifies parameters used to connect to the server, as a <link
257+
linkend="libpq-connstring">connction string</link>; these
258+
will override any conflicting command line options.
258259
</para>
259260
<para>
260261
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
@@ -169,15 +169,10 @@ EOF
169169
Specifies the name of the database to connect to. This is
170170
equivalent to specifying <replaceable
171171
class="parameter">dbname</replaceable> as the first non-option
172-
argument on the command line.
173-
</para>
174-
<para>
175-
If this parameter contains an <symbol>=</symbol> sign or starts
176-
with a valid <acronym>URI</acronym> prefix
177-
(<literal>postgresql://</literal>
178-
or <literal>postgres://</literal>), it is treated as a
179-
<parameter>conninfo</parameter> string. See <xref
180-
linkend="libpq-connstring"/> for more information.
172+
argument on the command line. The <replaceable>dbname</replaceable>
173+
can be a <link linkend="libpq-connstring">connection string</link>.
174+
If so, connection string parameters will override any conflicting
175+
command line options.
181176
</para>
182177
</listitem>
183178
</varlistentry>
@@ -499,7 +494,7 @@ EOF
499494
<listitem>
500495
<para>
501496
Never issue a password prompt. If the server requires password
502-
authentication and a password is not availableby othermeans
497+
authentication and a password is not availablefrom othersources
503498
such as a <filename>.pgpass</filename> file, the connection
504499
attempt will fail. This option can be useful in batch jobs and
505500
scripts where no user is present to enter a password.
@@ -519,13 +514,15 @@ EOF
519514
<listitem>
520515
<para>
521516
Force <application>psql</application> to prompt for a
522-
password before connecting to a database.
517+
password before connecting to a database, even if the password will
518+
not be used.
523519
</para>
524520

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