From: | Thom Brown <thom(at)linux(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix pg_dumpall with database names containing = |
Date: | 2013-02-27 09:52:38 |
Message-ID: | CAA-aLv56tg-=-wd--vN6FDao3LpRBqoXJoC+HrQ+VW4D6mTXjw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On 26 February 2013 16:29, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> wrote:
> On 26.02.2013 18:03, Thom Brown wrote:
>>
>> On 20 February 2013 15:14, Heikki Linnakangas<heikki(dot)linnakangas(at)iki(dot)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.
Yes, but while this is true, it still seems like some kind of parsing
oversight. Once I'm in that database, I can't switch user from within
psql:
8=8=# \c - moo
invalid connection option "8"
Previous connection kept
--
Thom
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2013-02-27 12:54:53 | Re: [COMMITTERS] pgsql: Fix pg_dumpall with database names containing = |
Previous Message | Tom Lane | 2013-02-26 20:59:00 | pgsql: Add missing .gitignore file. |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-02-27 10:01:06 | Re: pg_xlogdump compiler warning |
Previous Message | Miroslav Šimulčík | 2013-02-27 09:43:21 | Re: Check if trigger was fired deferred |