]> granicus.if.org Git - postgresql/commit
Fix pg_dumpall with database names containing =
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 20 Feb 2013 15:08:54 +0000 (17:08 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 20 Feb 2013 15:12:24 +0000 (17:12 +0200)
commit8b4ced45ecbc63a5ffade472e7fc3316cd60bd7f
tree9c8bd426711e28e124083bd7e542760b46155410
parentfeae7c3d2bedfccf8c61fafd372b9ddcdae8cc0d
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.
src/bin/pg_dump/pg_dumpall.c