From: | Felipe Gasper <felipe(at)felipegasper(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #13736: pg_dump should use E'' quotes |
Date: | 2015-10-26 22:06:04 |
Message-ID: | 562EA3CC.1030501@felipegasper.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 26 Oct 2015 4:55 PM, David G. Johnston wrote:
> On Mon, Oct 26, 2015 at 5:33 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>wrote:
>
> felipe(at)felipegasper(dot)com <mailto:felipe(at)felipegasper(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-10-26 22:08:02 | Re: BUG #13736: pg_dump should use E'' quotes |
Previous Message | Tom Lane | 2015-10-26 22:05:43 | Re: BUG #13736: pg_dump should use E'' quotes |