Re: BUG #15474: Special character escape sequences need better documentation, or more easily found documentation

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "bubthegreat(at)gmail(dot)com" <bubthegreat(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15474: Special character escape sequences need better documentation, or more easily found documentation
Date: 2018-10-31 16:35:51
Message-ID: CAKFQuwaJ=RbdLSmX6Kj5c_bKad7FALzrELiEkLy0LZU8enhdYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wednesday, October 31, 2018, PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:
>
> Where all columns inputs are strings, if any of those inputs have special
> characters like % or '

The only character needing escaping in a normal literal is the single quote
since it identifies the end of the literal otherwise. For an escaped
string the escaping character (backslash) also needs to be protected.
These are the only two and are documented in the sections covering those
types. A table containing one or maybe two rows doesn’t seem like an
improvement.

In both cases doubling up the special character protects its literal
meaning.

Specifically, % is not a special character for literals - though it can be
for a particular operator or function. Said operator will then document
how it is used.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2018-10-31 16:40:59 Re: BUG #15474: Special character escape sequences need better documentation, or more easily found documentation
Previous Message PG Bug reporting form 2018-10-31 16:25:06 BUG #15474: Special character escape sequences need better documentation, or more easily found documentation