Re: [HACKERS] SQL/JSON in PostgreSQL - Mailing list pgsql-hackers

From Oleg Bartunov
Subject Re: [HACKERS] SQL/JSON in PostgreSQL
Date
Msg-id CAF4Au4yKRkchUAFr9eUqUWnHYfa9MbxbNtecAgT2hzR0aidbiw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] SQL/JSON in PostgreSQL  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] SQL/JSON in PostgreSQL
List pgsql-hackers
On Sat, Jan 6, 2018 at 8:22 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> 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

I have slides about jsonpath
http://www.sai.msu.su/~megera/postgres/talks/sqljson-pgconf.eu-2017.pdf

> 2. documentation issue - there is "'{"a":[1,2,3,4,5]}'::json *? '$.a[*] ? (@
>> 2)'" - operator *? doesn't exists

There are should be @? operator

> 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.

It's impossible to distinguish jsonpath from text, so introducing new operators
are easier than everytime explicitly specify jsonpath datatype.

>
> Regards
>
> Pavel
>
>


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Add default role 'pg_access_server_files'
Next
From: Tom Lane
Date:
Subject: Re: Challenges preventing us moving to 64 bit transaction id (XID)?