Re: [HACKERS] SQL/JSON in PostgreSQL

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Oleg Bartunov <obartunov@gmail.com>, Andrew Dunstan <andrew.dunstan@2ndquadrant.com>, Michael Paquier <michael.paquier@gmail.com>, Piotr Stefaniak <email@piotr-stefaniak.me>, Pgsql Hackers <pgsql-hackers@postgresql.org>, Teodor Sigaev <teodor@postgrespro.ru>, Alexander Korotkov <a.korotkov@postgrespro.ru>, andrew Dunstan <andrew@dunslane.net>
Date: 2018-01-06T06:22:03Z
Lists: pgsql-hackers
Hi

I am checking the JSONPath related code

Questions, notes:

1. jsonpath operators are not consistent with any other .. json, xml .. I
am missing ?, @> operátors
2. documentation issue - there is "'{"a":[1,2,3,4,5]}'::json *? '$.a[*] ?
(@ > 2)'" - operator *? doesn't exists
3. operator @~ looks like too aggressive shortcut - should be better
commented

What is not clean, if jsonpath should to create some new operators for
json, jsonb types? It is special filter, defined by type, so from my
perspective the special operators are not necessary.

Regards

Pavel

Commits

  1. SQL/JSON: support the IS JSON predicate

  2. SQL/JSON: add standard JSON constructor functions