Re: BUG #15373: null / utf-8

From: 'Bruce Momjian' <bruce(at)momjian(dot)us>
To: André Hänsel <andre(at)webkr(dot)de>
Cc: orchideric(at)yahoo(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15373: null / utf-8
Date: 2018-09-14 02:20:33
Message-ID: 20180914022033.GD23686@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Sep 8, 2018 at 04:36:19PM -0400, 'Bruce Momjian' wrote:
> On Sat, Sep 8, 2018 at 09:43:18PM +0200, André Hänsel wrote:
> > For some reason the example given in the documentation for the "hex"
> > format uses such an "escape string literal":
> >
> > SELECT E'\\xDEADBEEF';
> >
> > I found this very confusing. Can this example be changed to a normal
> > string literal, like this?
> >
> > SELECT '\xDEADBEEF';
>
> You know, I 100% agree with you. We used the E'' syntax so we would
> produce the same results whether standard_conforming_strings was true or
> false. However, we changed the standard_conforming_strings default to
> true in Postgres 9.1 on 2011-09-12, and that release has been
> end-of-life for a year.
>
> I think it is time to clarify our documentation examples by assuming
> that standard_conforming_strings is true. I will work on a patch.
> Thanks.

I have developed the attached documentation patch to remove the E''
syntax. standard_conforming_strings defaulted to 'on' in PG 9.1.

I also found that our bytea data type section wasn't properly adjusted
when we changed the the default bytea_output to 'hex' in PG 9.0.

I think the only question is how far back to apply this patch. I am
thinking through 9.3.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

Attachment Content-Type Size
escape.diff text/x-diff 18.9 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2018-09-14 05:00:03 Re: BUG #15324: Non-deterministic behaviour from parallelised sub-query
Previous Message Андрей Ковальчук 2018-09-14 01:13:29 Re: BUG #15382: Error create dictionary in pg_dump