]> granicus.if.org Git - postgresql/commit
Allow "dbname" from connection string to be overridden in PQconnectDBParams
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 25 Nov 2014 15:12:07 +0000 (17:12 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 25 Nov 2014 15:39:44 +0000 (17:39 +0200)
commitadd1b052e2b2d5206474d58db25e48820242d15b
tree1cd92d7d156d90c66f3d3f8b7301a95c396e9b25
parent81d815dc3ed74a7d20f7b4c7d87c42816c7ee7af
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.
doc/src/sgml/libpq.sgml
src/interfaces/libpq/fe-connect.c