pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Felipe Gasper <felipe@felipegasper.com>
To: David G. Johnston <david.g.johnston@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13736: pg_dump should use E'' quotes
Date: Mon, 26 Oct 2015 17:06:04 -0500
Message-ID: <562EA3CC.1030501@felipegasper.com> (raw)
In-Reply-To: <CAKFQuwangrLOXh6XBGGp6R=iHDzj4ofHK_CJrfwE3csCMep+Nw@mail.gmail.com>
References: <20151026204847.3021.73649@wrigleys.postgresql.org>
	<3219.1445895186@sss.pgh.pa.us>
	<CAKFQuwangrLOXh6XBGGp6R=iHDzj4ofHK_CJrfwE3csCMep+Nw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 26 Oct 2015 4:55 PM, David G. Johnston wrote:
> On Mon, Oct 26, 2015 at 5:33 PM, Tom Lane <tgl@sss.pgh.pa.us
> <mailto:tgl@sss.pgh.pa.us>>wrote:
>
>     felipe@felipegasper.com <mailto: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



view thread (9+ messages)  latest in thread

Message-ID: <562EA3CC.1030501@felipegasper.com>
Permalink:  ../562EA3CC.1030501@felipegasper.com/
Also on:    postgresql.org/message-id/562EA3CC.1030501@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, david.g.johnston@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: BUG #13736: pg_dump should use E'' quotes
  In-Reply-To: <562EA3CC.1030501@felipegasper.com>
  References: <20151026204847.3021.73649@wrigleys.postgresql.org> <3219.1445895186@sss.pgh.pa.us> <CAKFQuwangrLOXh6XBGGp6R=iHDzj4ofHK_CJrfwE3csCMep+Nw@mail.gmail.com> <562EA3CC.1030501@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