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.92) (envelope-from ) id 1j9aTx-0003aR-PR for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2020 20:19:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9aTw-0002f8-1E for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2020 20:19:04 +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 1j9aTv-0002ey-J7 for pgsql-hackers@lists.postgresql.org; Wed, 04 Mar 2020 20:19:03 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1j9aTn-0007mK-OM for pgsql-hackers@postgresql.org; Wed, 04 Mar 2020 20:19:02 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 827D321C1E66; Wed, 4 Mar 2020 23:18:53 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [10.100.236.31] (unknown [195.82.154.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 3FC3921C1C2D; Wed, 4 Mar 2020 23:18:53 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1583353133; bh=eKvuJePDhTEIjEWyaGtzZIkhCWkMunovu0alX/BNJ90=; h=Subject:To:References:From:Date:In-Reply-To; b=JECHfWVUkgP+Lg8jMe46QKJ7UE3vnaBtuCiAaZr/Ox3PpXTywSR+ouiQDp2mk9C/J oTZENhV/89WfrjZ9o3HFUL5p8bL/ONXzNnJ0dHnz1Z6Nn4GjbohbU8oG6e5r/JznRo l17LHCciX0kW+H/4BoXudIjcRdygYKI63S5bcttE= Subject: Re: jsonpath syntax extensions To: David Steele , PostgreSQL Hackers References: From: Nikita Glukhov Organization: Postgres Professional Message-ID: <00706fa4-7ee3-bbb0-a497-e332035164f5@postgrespro.ru> Date: Wed, 4 Mar 2020 23:18:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------47496F127B12EAE85E11BE9F" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------47496F127B12EAE85E11BE9F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 04.03.2020 19:13, David Steele wrote: > Hi Nikita, > > On 2/27/20 10:57 AM, Nikita Glukhov wrote: >> >> Attached patches implement several useful jsonpath syntax extensions. >> I already published them two years ago in the original SQL/JSON thread, >> but then after creation of separate threads for SQL/JSON functions and >> JSON_TABLE I forgot about them. > > Are these improvements targeted at PG13 or PG14?  This seems to be a > pretty big change for the last CF of PG13.  I know these have been > submitted before but that was a few years ago so I think they count as > new. I believe that some of these improvements can get into PG13. There is no need to review all of them, we can choose only the simplest ones. Most of code changes in #3-#5 consist of straightforward boilerplate jsonpath I/O code, and only changes in jsonpath_exec.c are interesting. Only the patch #1 is mandatory, patches #3-#6 depend on it. The patch #2 is not necessary, if jbvArray and jbvObject values would be wrapped into jbvBinary by JsonbValueToJsonb() call in #4 and #5. Patch #4 is the simplest one (only 20 new lines of code in jsonpath_exec.c). Patch #6 is the most complex one, and it affects only jsonpath execution. -- Nikita Glukhov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------47496F127B12EAE85E11BE9F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

On 04.03.2020 19:13, David Steele wrote:

Hi Nikita,

On 2/27/20 10:57 AM, Nikita Glukhov wrote:

Attached patches implement several useful jsonpath syntax extensions.
I already published them two years ago in the original SQL/JSON thread,
but then after creation of separate threads for SQL/JSON functions and
JSON_TABLE I forgot about them.

Are these improvements targeted at PG13 or PG14?  This seems to be a pretty big change for the last CF of PG13.  I know these have been submitted before but that was a few years ago so I think they count as new.
I believe that some of these improvements can get into PG13.  There is no need
to review all of them, we can choose only the simplest ones.

Most of code changes in #3-#5 consist of straightforward boilerplate jsonpath
I/O code, and only changes in jsonpath_exec.c are interesting.

Only the patch #1 is mandatory, patches #3-#6 depend on it.

The patch #2 is not necessary, if jbvArray and jbvObject values would be
wrapped into jbvBinary by JsonbValueToJsonb() call in #4 and #5.

Patch #4 is the simplest one (only 20 new lines of code in jsonpath_exec.c).

Patch #6 is the most complex one, and it affects only jsonpath execution.

--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--------------47496F127B12EAE85E11BE9F--