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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #15474: Special character escape sequences need betterdocumentation, or more easily found documentation
Дата
Msg-id CAKFQuwaJ=RbdLSmX6Kj5c_bKad7FALzrELiEkLy0LZU8enhdYQ@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #15474: Special character escape sequences need betterdocumentation, or more easily found documentation  (PG Bug reporting form <noreply@postgresql.org>)
Список 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 по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15474: Special character escape sequences need betterdocumentation, or more easily found documentation
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #15474: Special character escape sequences need betterdocumentation, or more easily found documentation