Re: BUG #13736: pg_dump should use E'' quotes - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #13736: pg_dump should use E'' quotes
Date
Msg-id CAKFQuwZ0FwBxtt5BGDHn2Jx5cPLz9zOWoc0Arw4Ppzi12cnDvA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #13736: pg_dump should use E'' quotes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, Oct 26, 2015 at 6:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> "David G. Johnston" <david.g.johnston@gmail.com> writes:
> > On Mon, Oct 26, 2015 at 5:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> Yes.  For one thing, there would immediately be zero chance of loading
> >> view definitions produced by pg_dump into any other DBMS,
>
> > Ironic...=E2=80=8Bwe cannot write a standard conforming string out beca=
use we are
> > concerned other databases will be unable to read it.
>
> Hm?  The E'' syntax would specifically *not* be standard conforming.
>

=E2=80=8BI apparently always mis-understood what it was getting at...=E2=80=
=8B

From this I gather that standard conforming strings do not have any concept
of
=E2=80=8Bslash-=E2=80=8B
escaping
=E2=80=8B, just the=E2=80=8B
doubling-up the uni-quote
=E2=80=8B,=E2=80=8B
and so we introduced a non-standard version with an "E" prefix that
maintains the escaping behavior previously allowed?

I think part of my confusing was assuming that the normal was to allow
slash-escaping...which if we are outputting such in order to expect
external tools to accept the data for input would seem to be a reasonable
assumption.

David J.
=E2=80=8B

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #13736: pg_dump should use E'' quotes
Next
From: Felipe Gasper
Date:
Subject: Re: BUG #13736: pg_dump should use E'' quotes