doc: libpq connection options can override command-line flags
authorBruce Momjian
Sat, 3 Oct 2020 02:19:30 +0000 (22:19 -0400)
committerBruce Momjian
Sat, 3 Oct 2020 02:19:30 +0000 (22:19 -0400)
Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/16486-b9c93d71c02c4907@postgresql.org

Backpatch-through: 9.5

doc/src/sgml/ref/clusterdb.sgml
doc/src/sgml/ref/pg_basebackup.sgml
doc/src/sgml/ref/pg_dump.sgml
doc/src/sgml/ref/pg_dumpall.sgml
doc/src/sgml/ref/pg_isready.sgml
doc/src/sgml/ref/pg_receivewal.sgml
doc/src/sgml/ref/pg_recvlogical.sgml
doc/src/sgml/ref/pg_restore.sgml
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/reindexdb.sgml
doc/src/sgml/ref/vacuumdb.sgml

index 67582fd6e6921371680731b2ddc2965ac81b290f..099d140ac87d3605043d7553ccc94545b58e8056 100644 (file)
@@ -95,7 +95,10 @@ PostgreSQL documentation
         ) is not used, the database name is read
         from the environment variable PGDATABASE.  If
         that is not set, the user name specified for the connection is
-        used.
+        used.  The dbname can be a 
+        linkend="libpq-connstring">connection string.  If so,
+        connection string parameters will override any conflicting command
+        line options.
        
       
      
index e29476b14fda281f5aca282ae174ae270cb36ed5..d838fe0bd1343b57b91664b3c80fc1c455af32d1 100644 (file)
@@ -515,8 +515,9 @@ PostgreSQL documentation
       
       
        
-        Specifies parameters used to connect to the server, as a connection
-        string. See  for more information.
+        Specifies parameters used to connect to the server, as a 
+        linkend="libpq-connstring">connction string;  these
+        will override any conflicting command line options.
        
        
         The option is called --dbname for consistency with other
index 4b7631a4369026261635c72df13fa2e4caa91967..25a86a3cfc47b7119aeeffd089e2e75e002bb9a0 100644 (file)
@@ -1028,14 +1028,10 @@ PostgreSQL documentation
        Specifies the name of the database to connect to. This is
        equivalent to specifying 
        class="parameter">dbname as the first non-option
-       argument on the command line.
-      
-      
-       If this parameter contains an = sign or starts
-       with a valid URI prefix
-       (postgresql://
-       or postgres://), it is treated as a
-       conninfo string. See  for more information.
+       argument on the command line.  The dbname
+       can be a connection string.
+       If so, connection string parameters will override any conflicting
+       command line options.
       
       
      
index 9af2f5b9e78346044ace5d40f8a9e3b27381c7f6..00bf5e6739acc434b61283b64bec567bd2a37770 100644 (file)
@@ -467,8 +467,9 @@ PostgreSQL documentation
       
       
        
-        Specifies parameters used to connect to the server, as a connection
-        string. See  for more information.
+        Specifies parameters used to connect to the server, as a 
+        linkend="libpq-connstring">connction string;  these
+        will override any conflicting command line options.
        
        
         The option is called --dbname for consistency with other
index 2ee79a0bbebb46b4d4287776868cded24fc9b710..f966d0feed459bc05190fb70136967e77a3b63f8 100644 (file)
@@ -47,15 +47,11 @@ PostgreSQL documentation
       
       
       
-       Specifies the name of the database to connect to.
-      
-      
-       If this parameter contains an = sign or starts
-       with a valid URI prefix
-       (postgresql://
-       or postgres://), it is treated as a
-       conninfo string. See 
-       linkend="libpq-connstring"> for more information.
+       Specifies the name of the database to connect to. The
+       dbname can be a 
+       linkend="libpq-connstring">connection string.  If so,
+       connection string parameters will override any conflicting command
+       line options.
       
       
     
index d2cd2d63330e4925aa0fc59ee14911d65ef834fd..e2cfb1786cb6b5d0a79ea90cc47595f8c18819b9 100644 (file)
@@ -214,8 +214,9 @@ PostgreSQL documentation
       
       
        
-        Specifies parameters used to connect to the server, as a connection
-        string. See  for more information.
+        Specifies parameters used to connect to the server, as a 
+        linkend="libpq-connstring">connction string;  these
+        will override any conflicting command line options.
        
        
         The option is called --dbname for consistency with other
index 9c7bb1907be79b1988c568a364f2eb41e97fb7f3..5ac20ba90d2a1f7965199ad095c501fa5c25e337 100644 (file)
@@ -273,14 +273,16 @@ PostgreSQL documentation
 
     
       
-       
-       
+       
+       
        
         
-         The database to connect to.  See the description of the actions for
-         what this means in detail.  This can be a libpq connection string;
-         see  for more information.  Defaults
-         to user name.
+         The database to connect to.  See the description
+         of the actions for what this means in detail.
+         The dbname can be a 
+         linkend="libpq-connstring">connection string.  If so,
+         connection string parameters will override any conflicting
+         command line options.  Defaults to the user name.
         
        
       
index 73a34834dce68a6bde88781d1f59784ddd26ebb2..0fddbe7dcc3187a61b003add8eac1a1e8027d728 100644 (file)
@@ -145,7 +145,10 @@ PostgreSQL documentation
        
         Connect to database 
         class="parameter">dbname and restore directly
-        into the database.
+        into the database.  The dbname can
+        be a connection string.
+        If so, connection string parameters will override any conflicting
+        command line options.
        
       
      
index 2f747c4be619b9335b400ef40dd188f37e6303d9..992b23e7f2fdc4d4943ffb64c9ae11df0800c425 100644 (file)
@@ -157,15 +157,10 @@ EOF
        Specifies the name of the database to connect to. This is
        equivalent to specifying 
        class="parameter">dbname as the first non-option
-       argument on the command line.
-      
-      
-       If this parameter contains an = sign or starts
-       with a valid URI prefix
-       (postgresql://
-       or postgres://), it is treated as a
-       conninfo string. See 
-       linkend="libpq-connstring"> for more information.
+       argument on the command line.  The dbname
+       can be a connection string.
+       If so, connection string parameters will override any conflicting
+       command line options.
       
       
     
@@ -487,7 +482,7 @@ EOF
      
       
        Never issue a password prompt.  If the server requires password
-       authentication and a password is not available by other means
+       authentication and a password is not available from other sources
        such as a .pgpass file, the connection
        attempt will fail.  This option can be useful in batch jobs and
        scripts where no user is present to enter a password.
@@ -507,13 +502,15 @@ EOF
       
       
        Force psql to prompt for a
-       password before connecting to a database.
+       password before connecting to a database, even if the password will
+       not be used.
       
 
       
-       This option is never essential, since psql
-       will automatically prompt for a password if the server demands
-       password authentication.  However, psql
+       If the server requires password authentication and a password is not
+       available from other sources such as a .pgpass
+       file, psql will prompt for a
+       password in any case.  However, psql
        will waste a connection attempt finding out that the server wants a
        password.  In some cases it is worth typing 
        the extra connection attempt.
index e4721d81130b7625599a9fdd63adcb3e23fba350..d91697fe8d85b978ac56ac1a36d6bb79ce978350 100644 (file)
@@ -128,7 +128,10 @@ PostgreSQL documentation
         ) is not used, the database name is read
         from the environment variable PGDATABASE.  If
         that is not set, the user name specified for the connection is
-        used.
+        used.  The dbname can be a 
+        linkend="libpq-connstring">connection string.  If so,
+        connection string parameters will override any conflicting command
+        line options.
        
       
      
index 4f6fa0d7085cfa8c7ebc297a4860a4e290c0bf47..26e113b058f1a57ffa66c34e4b08508b3075305b 100644 (file)
@@ -97,7 +97,10 @@ PostgreSQL documentation
         ) is not used, the database name is read
         from the environment variable PGDATABASE.  If
         that is not set, the user name specified for the connection is
-        used.
+        used.  The dbname can be a 
+        linkend="libpq-connstring">connection string.  If so,
+        connection string parameters will override any conflicting command
+        line options.