Thread: pgsql: Fix pg_dumpall with database names containing =

pgsql: Fix pg_dumpall with database names containing =

From
Heikki Linnakangas
Date:
Fix pg_dumpall with database names containing =

If a database name contained a '=' character, pg_dumpall failed. The problem
was in the way pg_dumpall passes the database name to pg_dump on the
command line. If it contained a '=' character, pg_dump would interpret it
as a libpq connection string instead of a plain database name.

To fix, pass the database name to pg_dump as a connection string,
"dbname=foo", with the database name escaped if necessary.

Back-patch to all supported branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f435cd1d385859a0cdb1d70fccc21dde2b1ee116

Modified Files
--------------
src/bin/pg_dump/pg_dumpall.c |   34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)