pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Felipe Gasper <felipe@felipegasper.com>
To: David Gould <daveg@sonic.net>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: pg_restore WAS Re:  BUG #13702: pg_dump interprets “=” in a db name incorrectly
Date: Fri, 23 Oct 2015 13:20:38 -0500
Message-ID: <562A7A76.9000700@felipegasper.com> (raw)
In-Reply-To: <20151023054510.5b5467c6@engels>
References: <20151023003445.931.91267@wrigleys.postgresql.org>
	<CAKFQuwZPfVGx9URCy6bOJLiC+h4s6d7EpwkdGS1NCcsvfyyGZA@mail.gmail.com>
	<56298DAC.3070906@felipegasper.com>
	<20151023054510.5b5467c6@engels>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Apparently 9.0 can’t pg_restore DBs that have equals signs in them...at 
least, such is the case with pg_restore on 9.0.18. It gets confused by 
the “=”, even when it’s in the --dbname argument.

To me, that seems like a bug, as there’s no reason that the --dbname 
argument should be interpreted as anything other than the name of a 
database.

Does anyone here happen to know when pg_restore offered alternative ways 
of specifying the database?

-FG

On 23 Oct 2015 7:45 AM, David Gould wrote:
> On Thu, 22 Oct 2015 20:30:20 -0500
> Felipe Gasper <felipe@felipegasper.com> wrote:
>
>> Interesting -- also, in 9.0 I *can* do:
>>
>> dbname='...'
>>
>> … and it works. Undocumented, apparently (?), but it does the job.
>>
>> But, I actually have to support all the way back to 8.1, and I’m a bit
>> leery of relying on undocumented (?) features for our backup
>> functionality. Hopefully down the road we can just move everything to
>>   >=9.3, and peace and love will reign. :)
>
> You can dump and load older version database from newer version clients.
> The dbname parsing problem you are having is on the client, not the server,
> so if you can arrange to take the backup with a more current client then
> one of the suggestions in this thread will work for you.
>
> -dg
>



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (3+ messages)  latest in thread

Message-ID: <562A7A76.9000700@felipegasper.com>
Permalink:  ../562A7A76.9000700@felipegasper.com/
Also on:    postgresql.org/message-id/562A7A76.9000700@felipegasper.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: felipe@felipegasper.com, daveg@sonic.net, david.g.johnston@gmail.com
  Subject: Re: pg_restore WAS Re:  BUG #13702: pg_dump interprets “=” in a db name incorrectly
  In-Reply-To: <562A7A76.9000700@felipegasper.com>
  References: <20151023003445.931.91267@wrigleys.postgresql.org> <CAKFQuwZPfVGx9URCy6bOJLiC+h4s6d7EpwkdGS1NCcsvfyyGZA@mail.gmail.com> <56298DAC.3070906@felipegasper.com> <20151023054510.5b5467c6@engels> <562A7A76.9000700@felipegasper.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