Re: BUG #15474: Special character escape sequences need betterdocumentation, or more easily found documentation - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #15474: Special character escape sequences need betterdocumentation, or more easily found documentation
Date
Msg-id CAKFQuwaJ=RbdLSmX6Kj5c_bKad7FALzrELiEkLy0LZU8enhdYQ@mail.gmail.com
Whole thread Raw
In response to BUG #15474: Special character escape sequences need betterdocumentation, or more easily found documentation  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Wednesday, October 31, 2018, PG Bug reporting form <noreply@postgresql.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.

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15474: Special character escape sequences need betterdocumentation, or more easily found documentation
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #15474: Special character escape sequences need betterdocumentation, or more easily found documentation