Re: SQL/JSON in PostgreSQL
Alexander Korotkov <a.korotkov@postgrespro.ru>
From: Alexander Korotkov <a.korotkov@postgrespro.ru>
To: Oleg Bartunov <obartunov@gmail.com>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>,
Daniel Gustafsson <daniel@yesql.se>, Teodor Sigaev <teodor@postgrespro.ru>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>,
Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>, David Steele <david@pgmasters.net>, Pavel Stehule <pavel.stehule@gmail.com>, andrew Dunstan <andrew@dunslane.net>
Date: 2017-09-17T10:15:14Z
Lists: pgsql-hackers
On Sun, Sep 17, 2017 at 11:08 AM, Oleg Bartunov <obartunov@gmail.com> wrote: > On 16 Sep 2017 02:32, "Nikita Glukhov" <n.gluhov@postgrespro.ru> wrote: > > On 15.09.2017 22:36, Oleg Bartunov wrote: > > On Fri, Sep 15, 2017 at 7:31 PM, Robert Haas <robertmhaas@gmail.com> >> wrote: >> >>> On Fri, Sep 15, 2017 at 10:10 AM, Daniel Gustafsson <daniel@yesql.se> >>> wrote: >>> >>>> Can we expect a rebased version of this patch for this commitfest? >>>> Since it’s >>>> a rather large feature it would be good to get it in as early as we can >>>> in the >>>> process. >>>> >>> Again, given that this needs a "major" rebase and hasn't been updated >>> in a month, and given that the CF is already half over, this should >>> just be bumped to the next CF. We're supposed to be trying to review >>> things that were ready to go by the start of the CF, not the end. >>> >> We are supporting v10 branch in our github repository >> https://github.com/postgrespro/sqljson/tree/sqljson_v10 >> >> Since the first post we made a lot of changes, mostly because of >> better understanding the standard and availability of technical report >> (http://standards.iso.org/ittf/PubliclyAvailableStandards/c0 >> 67367_ISO_IEC_TR_19075-6_2017.zip). >> Most important are: >> >> 1.We abandoned FORMAT support, which could confuse our users, since we >> have data types json[b]. >> >> 2. We use XMLTABLE infrastructure, extended for JSON_TABLE support. >> >> 3. Reorganize commits, so we could split one big patch by several >> smaller patches, which could be reviewed independently. >> >> 4. The biggest problem is documentation, we are working on it. >> >> Nikita will submit patches soon. >> > > Attached archive with 9 patches rebased onto latest master. > > 0001-jsonpath-v02.patch: > - jsonpath type > - jsonpath execution on jsonb type > - jsonpath operators for jsonb type > - GIN support for jsonpath operators > > 0002-jsonpath-json-v02.patch: > - jsonb-like iterators for json type > - jsonpath execution on json type > - jsonpath operators for json type > > 0003-jsonpath-extensions-v02.patch: > 0004-jsonpath-extensions-tests-for-json-v02.patch: > - some useful standard extensions with tests > 0005-sqljson-v02.patch: > - SQL/JSON constructors (JSON_OBJECT[AGG], JSON_ARRAY[AGG]) > - SQL/JSON query functions (JSON_VALUE, JSON_QUERY, JSON_EXISTS) > - IS JSON predicate > > 0006-sqljson-json-v02.patch: > - SQL/JSON support for json type and tests > > 0007-json_table-v02.patch: > - JSON_TABLE using XMLTABLE infrastructure > > 0008-json_table-json-v02.patch: > - JSON_TABLE support for json type > > 0009-wip-extensions-v02.patch: > - FORMAT JSONB > - jsonb to/from bytea casts > - jsonpath operators > - some unfinished jsonpath extensions > > > Originally, JSON path was implemented only for jsonb type, and I decided to > add jsonb-like iterators for json type for json support implementation with > minimal changes in JSON path code. This solution (see jsonpath_json.c from > patch 0002) looks a little dubious to me, so I separated json support into > independent patches. > > The last WIP patch 0009 is unfinished and contains a lot of FIXMEs. But > the ability to use arbitrary Postgres operators in JSON path with > explicitly > specified types is rather interesting, and I think it should be shown now > to get a some kind of pre-review. > > We are supporting v11 and v10 branches in our github repository: > > https://github.com/postgrespro/sqljson/tree/sqljson > https://github.com/postgrespro/sqljson/tree/sqljson_wip > https://github.com/postgrespro/sqljson/tree/sqljson_v10 > https://github.com/postgrespro/sqljson/tree/sqljson_v10_wip > > > We provide web interface to our build > http://sqlfiddle.postgrespro.ru/#!21/ > +1, For experimenting with SQL/JSON select "PostgreSQL 10dev+SQL/JSON" in the version select field on top toolbar. ------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
Commits
-
SQL/JSON: support the IS JSON predicate
- 6ee30209a6f1 16.0 landed
-
SQL/JSON: add standard JSON constructor functions
- 7081ac46ace8 16.0 landed