]> granicus.if.org Git - postgresql/commit
Modify recently added PQconnectdbParams() with new argument, expand_dbname.
authorJoe Conway <mail@joeconway.com>
Fri, 5 Feb 2010 03:09:05 +0000 (03:09 +0000)
committerJoe Conway <mail@joeconway.com>
Fri, 5 Feb 2010 03:09:05 +0000 (03:09 +0000)
commitf419a82c704ec33fe5b861f914935b233a54bcee
tree4c32bd4b142b4c76d6fa17e403eaa189df835e7b
parenta141ec13de1b2ee4ff7ec1e6b0da03ce7eb7dbbb
Modify recently added PQconnectdbParams() with new argument, expand_dbname.
If expand_dbname is non-zero and dbname contains an = sign, it is taken as
a conninfo string in exactly the same way as if it had been passed to
PQconnectdb. This is equivalent to the way PQsetdbLogin() works, allowing
PQconnectdbParams() to be a complete alternative.

Also improve the way the new function is called from psql and replace a
previously missed call to PQsetdbLogin() in psql. Additionally use
PQconnectdbParams() for pg_dump and friends, and the bin/scripts
command line utilities such as vacuumdb, createdb, etc.

Finally, update the documentation for the new parameter, as well as the
nuances of precedence in cases where key words are repeated or duplicated
in the conninfo string.
doc/src/sgml/libpq.sgml
src/bin/pg_dump/pg_backup_db.c
src/bin/pg_dump/pg_dumpall.c
src/bin/psql/command.c
src/bin/psql/startup.c
src/bin/scripts/common.c
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/libpq-fe.h