pgsql: Allow "dbname" from connection string to be overridden in PQconn - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Allow "dbname" from connection string to be overridden in PQconn
Date
Msg-id E1XtIHp-0004pc-3o@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/9880fea4fd0003087302be22cd7bbf63c4548c0c

Modified Files
--------------
src/interfaces/libpq/fe-connect.c |   12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Allow "dbname" from connection string to be overridden in PQconn
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Allow using connection URI in primary_conninfo.