Re: BUG #13736: pg_dump should use E'' quotes

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Felipe Gasper <felipe(at)felipegasper(dot)com>, "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:15:55
Message-ID: CAKFQuwZ0FwBxtt5BGDHn2Jx5cPLz9zOWoc0Arw4Ppzi12cnDvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Oct 26, 2015 at 6:05 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > On Mon, Oct 26, 2015 at 5:33 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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...​we cannot write a standard conforming string out because we are
> > concerned other databases will be unable to read it.
>
> Hm? The E'' syntax would specifically *not* be standard conforming.
>

​I apparently always mis-understood what it was getting at...​

From this I gather that standard conforming strings do not have any concept
of
​slash-​
escaping
​, just the​
doubling-up the uni-quote
​,​
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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Felipe Gasper 2015-10-26 22:17:16 Re: BUG #13736: pg_dump should use E'' quotes
Previous Message Andres Freund 2015-10-26 22:08:02 Re: BUG #13736: pg_dump should use E'' quotes