From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Subject: Re: Fix parsing of identifiers in jsonpath
Date: Wed, 18 Sep 2019 17:28:16 -0400
Message-ID: <11458.1568842096@sss.pgh.pa.us> (raw)
In-Reply-To: <3603843f-b5fc-d8d9-c842-ccde2288b967@postgrespro.ru>
References: <3603843f-b5fc-d8d9-c842-ccde2288b967@postgrespro.ru>
Nikita Glukhov <n.gluhov@postgrespro.ru> writes:
> I don't know if it is possible to check Unicode properties "ID_Start" and
> "ID_Continue" in Postgres, and what ZWNJ/ZWJ is. Now, identifier's starting
> character set is simply determined by the exclusion of all recognized special
> characters.
TBH, I think you should simply ignore any aspect of any of these standards
that is defined by reference to Unicode. We are not necessarily dealing
with a Unicode character set, so at best, references to things like ZWNJ
are unreachable no-ops in a lot of environments.
As a relevant example, modern SQL defines whitespace in terms of Unicode[1],
a fact that we have ignored from the start and will likely continue to
do so.
You could do a lot worse than to just consider identifiers to be the same
strings as our SQL lexer would do (modulo things like "$" that have
special status in the path language).
regards, tom lane
[1] cf 4.2.4 "Character repertoires" in SQL:2011
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, n.gluhov@postgrespro.ru, a.korotkov@postgrespro.ru
Subject: Re: Fix parsing of identifiers in jsonpath
In-Reply-To: <11458.1568842096@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox