Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zqpuk-0002Uq-8d for pgsql-bugs@arkaria.postgresql.org; Mon, 26 Oct 2015 22:06:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zqpuj-000652-Ko for pgsql-bugs@arkaria.postgresql.org; Mon, 26 Oct 2015 22:06:49 +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 1Zqpu6-00052E-Sy for pgsql-bugs@postgresql.org; Mon, 26 Oct 2015 22:06:11 +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 1Zqpu4-0004gP-L4 for pgsql-bugs@postgresql.org; Mon, 26 Oct 2015 22:06:09 +0000 Received: from 99-107-252-128.lightspeed.hstntx.sbcglobal.net ([99.107.252.128]:50883 helo=Macintosh-2.local) by premium12.web-hosting.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1Zqpu1-0045nG-9o; Mon, 26 Oct 2015 18:06:06 -0400 Subject: Re: BUG #13736: pg_dump should use E'' quotes To: "David G. Johnston" , Tom Lane References: <20151026204847.3021.73649@wrigleys.postgresql.org> <3219.1445895186@sss.pgh.pa.us> Cc: "pgsql-bugs@postgresql.org" From: Felipe Gasper Message-ID: <562EA3CC.1030501@felipegasper.com> Date: Mon, 26 Oct 2015 17:06:04 -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 26 Oct 2015 4:55 PM, David G. Johnston wrote: > On Mon, Oct 26, 2015 at 5:33 PM, Tom Lane >wrote: > > felipe@felipegasper.com writes: > > When dumping a DB whose name has a backslash in it, I get a warning like: > > > ------ > > pg_dump: WARNING: nonstandard use of \\ in a string literal > > LINE 1: ...) AS description FROM pg_database WHERE datname = 'i have / ... > > ^ > > HINT: Use the escape string syntax for backslashes, e.g., E'\\'. > > ------ > > It took me some time to reproduce that, but I eventually realized that > you must have standard_conforming_strings turned off in your database > settings. > > > ​[...] > ​ > > > Yes. For one thing, there would immediately be zero chance of loading > view definitions produced by pg_dump into any other DBMS, > > > Ironic...​we cannot write a standard conforming string out because we > are concerned other databases will be unable to read it. > > The OP is advised to set "escape_string_warning" to "off" if they also > wish to have "standard_conforming_strings" set to "off". The question > then is whether we should do so during restore regardless of whether the > user has done so. The problem is that I don’t control the DB server... -FG -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs