Skip site navigation (1) Skip section navigation (2)

Re: SQL/JSON in PostgreSQL

From: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Piotr Stefaniak <email(at)piotr-stefaniak(dot)me>, "obartunov(at)gmail(dot)com" <obartunov(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)postgrespro(dot)ru>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: SQL/JSON in PostgreSQL
Date: 2017-11-03 22:52:53
Message-ID: a95c1ca0-0f5d-6b6d-82af-62fdff4dad3a@postgrespro.ru (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackers
On 03.11.2017 15:07, Michael Paquier wrote:

> On Fri, Nov 3, 2017 at 11:29 AM, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru> wrote:
>> By standard only string literals can be used in JSON path specifications.
>> But of course it is possible to allow to use variable jsonpath expressions
>> in
>> SQL/JSON functions.
>>
>> Attached patch implements this feature for JSON query functions, JSON_TABLE
>> is
>> not supported now because it needs some refactoring.
>>
>> I have pushed this commit to the separate branch because it is not finished
>> yet:
>> https://github.com/postgrespro/sqljson/tree/sqljson_variable_json_path
> The patch sent previously does not directly apply on HEAD, and as far
> as I can see the last patch set published on
> https://www.postgresql.org/message-id/2361ae4a-66b1-c6c5-ea6a-84851a1c08b5@postgrespro.ru
> has rotten. Could you send a new patch set?
Attached patch set rebased onto current master.
Branches in our github repository also updated.

> About the patch set, I had a look at the first patch which is not that
> heavy, however it provides zero documentation, close to zero comments,
> but adds more than 500 lines of code. I find that a bit hard to give
> an opinion on, having commit messages associated to each patch would
> be also nice. This way, reviewers can figure what's going out in this
> mess and provide feedback.
Sorry that comments and commit messages are still absent. I am going to 
do it
in the next version of these patches where SQL/JSON constructors displaying
will be fixed.

>   Making things incremental is welcome as
> well, for example in the first patch I have a hard way finding out why
> timestamps are touched to begin with.
Timestamp's code was touched to add support of two features needed for 
SQL/JSON
  .datetime() item method by standard:
  - TZH and TZM template patterns
  - datetime components recognition

I absolutely agree that this should be in a separate patch.

> The patch is already marked as "waiting on author" for more than one month.
-- 
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment: sqljson_v04.tgz
Description: application/x-compressed-tar (203.5 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Paul RamseyDate: 2017-11-03 22:56:24
Subject: Re: Parallel Plans and Cost of non-filter functions
Previous:From: Alexander KorotkovDate: 2017-11-03 22:12:43
Subject: Re: How to implement a SP-GiST index as a extension module?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group