Re: Fix parsing of identifiers in jsonpath

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: Fix parsing of identifiers in jsonpath
Дата
Msg-id 244729e1-1192-8106-1643-fe9aa4f846d6@anastigmatix.net
обсуждение исходный текст
Ответ на Fix parsing of identifiers in jsonpath  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Список pgsql-hackers
On 9/18/19 11:10 AM, Nikita Glukhov wrote:

> 4. Even if the Unicode escape sequence '\uXXXX' is used, it cannot produce
>    special symbols or whitespace, because the identifiers are displayed
> ...
> I don't know if it is possible to check Unicode properties "ID_Start" and
> "ID_Continue" in Postgres, and what ZWNJ/ZWJ is.

ZWNJ and ZWJ are U+200C and U+200D (mentioned in [1]).

Also, it's not just that a Unicode escape sequence can't make a
special symbol or whitespace; it can't make any character that's
not allowed there by the other rules:

"A UnicodeEscapeSequence cannot be used to put a code point into an
IdentifierName that would otherwise be illegal. In other words, if a \
UnicodeEscapeSequence sequence were replaced by the SourceCharacter it
contributes, the result must still be a valid IdentifierName that has
the exact same sequence of SourceCharacter elements as the original
IdentifierName. All interpretations of IdentifierName within this
specification are based upon their actual code points regardless of
whether or not an escape sequence was used to contribute any particular
code point."


A brief glance through src/backend/utils/mb/Unicode shows that the
Makefile does download a bunch of stuff, but maybe not the Unicode
character data that would allow testing ID_Start and ID_Continue?
I'm not sure.

Regards,
-Chap



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Commit fest 2019-09