Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZpRBg-0003bA-Mn for pgsql-bugs@arkaria.postgresql.org; Fri, 23 Oct 2015 01:30:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZpRBg-000479-4Z for pgsql-bugs@arkaria.postgresql.org; Fri, 23 Oct 2015 01:30:32 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZpRBf-00046y-Fp for pgsql-bugs@postgresql.org; Fri, 23 Oct 2015 01:30:31 +0000 Received: from p12.web-hosting.com ([192.64.118.62]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZpRBY-0004rc-Rd for pgsql-bugs@postgresql.org; Fri, 23 Oct 2015 01:30:30 +0000 Received: from [208.74.121.106] (port=12781 helo=Macintosh-2.local) by premium12.web-hosting.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1ZpRBV-001zGv-Tk; Thu, 22 Oct 2015 21:30:23 -0400 Subject: =?UTF-8?Q?Re:__BUG_#13702:_pg=5fdump_interprets_=e2=80=9c=3d?= =?UTF-8?Q?=e2=80=9d_in_a_db_name_incorrectly?= To: "David G. Johnston" References: <20151023003445.931.91267@wrigleys.postgresql.org> Cc: "pgsql-bugs@postgresql.org" From: Felipe Gasper Message-ID: <56298DAC.3070906@felipegasper.com> Date: Thu, 22 Oct 2015 20:30:20 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - premium12.web-hosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - felipegasper.com X-Get-Message-Sender-Via: premium12.web-hosting.com: authenticated_id: fgasper/from_h X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 22 Oct 2015 7:56 PM, David G. Johnston wrote: > On Thu, Oct 22, 2015 at 8:34 PM, >wrote: > > The following bug has been logged on the website: > > Bug reference: 13702 > Logged by: Felipe Gasper > Email address: felipe@felipegasper.com > PostgreSQL version: Unsupported/Unknown > Operating system: Linux > Description: > > For the purposes of an administrative frontend that I help > develop/maintain, > I have a database named: > > -------------- > abcde_1234567890-=~!@#$%^&*()_+[]\{}|;:?,.<b> spaces > -------------- > > When I try to back up this DB via pg_dump, the utility appears to > split the > DB name on the “=”, thinking that it’s another command-line option. > > I’ve tried passing in “--”, but no joy. I tried passing “--dbname” > then the > DB name, but pg_dump doesn’t seem to accept that argument. > > > "--dbname=..." ​Documented 9.3 and above​ > > > The only working solution I have found is to set the DB name in > PGDATABASE. > > I found this in 9.0.18. Maybe it’s still a problem in supported > releases, > too? > > > It was decided to make the database name in this situation be an > abstract concept as opposed to strictly referring to a named database. > Because of this the equal sign has a special meaning that, apparently, > cannot be overridden. > > You may want to consider URI format - the following appears to work (9.3 > tested) > > psql postgres:///db=123 > >psql: FATAL: database "db=123" does not exist > 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. :) Thank you! -Felipe Gasper Houston, TX -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs