summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-11-25 17:12:07 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-11-25 17:38:52 +0200
commit6c1d521af35e496639bbb39764c30115879af47f (patch)
treee20b0c8808b6bc5941c2dacd84571d9c8872bb0b /doc/src
parent811015ff9aafd2d5e03fbd931f7c6102b3d6516a (diff)
Allow "dbname" from connection string to be overridden in PQconnectDBParams
If the "dbname" attribute in PQconnectDBParams contained a connection string or URI (and expand_dbname = TRUE), the database name from the connection string could not be overridden by a subsequent "dbname" keyword in the array. That was not intentional; all other options can be overridden. Furthermore, any subsequent "dbname" caused the connection string from the first dbname value to be processed again, overriding any values for the same options that were given between the connection string and the second dbname option. In the passing, clarify in the docs that only the first dbname option in the array is parsed as a connection string. Alex Shulgin. Backpatch to all supported versions.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/libpq.sgml5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 6d561a3d8c1..c7ac9f2671e 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -124,7 +124,10 @@ PGconn *PQconnectdbParams(const char * const *keywords,
<para>
When <literal>expand_dbname</literal> is non-zero, the
<parameter>dbname</parameter> key word value is allowed to be recognized
- as a connection string. More details on the possible formats appear in
+ as a connection string. Only the first occurrence of
+ <parameter>dbname</parameter> is expanded this way, any subsequent
+ <parameter>dbname</parameter> value is processed as plain database name. More
+ details on the possible connection string formats appear in
<xref linkend="libpq-connstring">.
</para>