Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAhUz-0002or-K2 for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Sep 2019 21:28:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iAhUy-00041k-Fx for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Sep 2019 21:28:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAhUy-00041S-4D for pgsql-hackers@lists.postgresql.org; Wed, 18 Sep 2019 21:28:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iAhUr-0006DI-RT for pgsql-hackers@postgresql.org; Wed, 18 Sep 2019 21:28:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x8ILSGpO011459; Wed, 18 Sep 2019 17:28:16 -0400 From: Tom Lane To: Nikita Glukhov cc: PostgreSQL Hackers , Alexander Korotkov Subject: Re: Fix parsing of identifiers in jsonpath In-reply-to: <3603843f-b5fc-d8d9-c842-ccde2288b967@postgrespro.ru> References: <3603843f-b5fc-d8d9-c842-ccde2288b967@postgrespro.ru> Comments: In-reply-to Nikita Glukhov message dated "Wed, 18 Sep 2019 18:10:27 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11457.1568842096.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Sep 2019 17:28:16 -0400 Message-ID: <11458.1568842096@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Nikita Glukhov writes: > I don't know if it is possible to check Unicode properties "ID_Start" an= d > "ID_Continue" in Postgres, and what ZWNJ/ZWJ is. Now, identifier's star= ting > character set is simply determined by the exclusion of all recognized sp= ecial > 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