Re: Tackling JsonPath support - Mailing list pgsql-hackers

From Christian Convey
Subject Re: Tackling JsonPath support
Date
Msg-id CAPfS4ZySNLyVeoLsPNfS9vRZOpzs3VX+GLAyoLxf3Q-VFECuQw@mail.gmail.com
Whole thread Raw
In response to Tackling JsonPath support  (Christian Convey <christian.convey@gmail.com>)
List pgsql-hackers
On Mon, Nov 28, 2016 at 9:40 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
​...​

> ​Hi Pavel,
>
> Can you clarify what you meant?  I *think* you're saying:
>
> * It's not important for me to match the syntax/semantics of the json-path implementations found in MySQL / Oracle / DB2 / ​MS SQL Server, and
>

oh no. the syntax is important. But for start we can have a subset. For json table function .. json to relation mapping is important path expression. some other features like predicates
are nice, but can be implemented later.

Im sorry. My English is bad.

​Hi Pavel,

You're English is very good, actually.  I think the confusion arises from me speaking in vague terms.  I apologize for that.  Allow me to be more specific about what I'm proposing to do.

I propose adding to "contrib" a function with the following characteristics:

* Its signature is "json_path( jsonb from_json, string json_path_expression) --> jsonb".

* The function will hopefully be a useful building block for PG's implementation of "official" JSON operators such as "JSON_TABLE".  Once the PG community agrees on what those operators' syntax/semantics should be.
* The function will hopefully be immediately useful to PG users who want JSONPath -like operations on their "jsonb" objects.

- C

pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: PSQL commands: \quit_if, \quit_unless
Next
From: "Karl O. Pinc"
Date:
Subject: Re: Patch to implement pg_current_logfile() function