From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Thom Brown <thom@linux.com>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Fix pg_dumpall with database names containing =
Date: Tue, 26 Feb 2013 18:29:10 +0200
Message-ID: <512CE2D6.2010204@vmware.com> (raw)
In-Reply-To: <CAA-aLv5ZECCtzuBVWW8oB5yN0GCxFSNb9Eb1Onqj40fFxTRnxA@mail.gmail.com>
References: <E1U8BNY-0008Uu-7A@gemulon.postgresql.org>
<CAA-aLv5ZECCtzuBVWW8oB5yN0GCxFSNb9Eb1Onqj40fFxTRnxA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
On 26.02.2013 18:03, Thom Brown wrote:
> On 20 February 2013 15:14, Heikki Linnakangas<heikki.linnakangas@iki.fi> wrote:
>> 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.
>
> I also notice that if you create a database with an "=" in, you can't
> connect to it using psql.
Specifying it as a connection string works:
psql dbname='8=8'
That's the same trick I applied to pg_dumpall's pg_dump invocations.
- Heikki
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: hlinnakangas@vmware.com, thom@linux.com
Subject: Re: pgsql: Fix pg_dumpall with database names containing =
In-Reply-To: <512CE2D6.2010204@vmware.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox