Re: SQL/JSON path issues/questions

From: Liudmila Mantrova <l(dot)mantrova(at)postgrespro(dot)ru>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Thom Brown <thom(at)linux(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL/JSON path issues/questions
Date: 2019-07-03 14:27:51
Message-ID: 6d21b33e-1a4b-a8a6-d0d2-a11e16d68255@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6/28/19 6:47 AM, Alexander Korotkov wrote:
> On Tue, Jun 25, 2019 at 6:38 PM Liudmila Mantrova
> <l(dot)mantrova(at)postgrespro(dot)ru> wrote:
>> Thank you for the catch! Please see the modified version of patch 0004
>> attached.
> I tried to review and revise the part related to filters, but I failed
> because I don't understand the notions used in the documentation.
>
> What is the difference between filter expression and filter condition?
> I can guess that filter expression contains question mark,
> parentheses and filter condition inside. But this sentence is in
> contradiction with my guess: "A filter expression must be enclosed in
> parentheses and preceded by a question mark". So, filter expression
> is inside the parentheses. Then what is filter condition? The same?
>
>> Each filter expression can provide one or more filters
>> that are applied to the result of the path evaluation.
>
> So additionally to filter condition and filter expression we introduce
> the notion of just filter. What is it? Could we make it without
> introduction of new notion?
>
> ------
> Alexander Korotkov
> Postgres Professional: http://www.postgrespro.com
> The Russian Postgres Company

Hi,

I have rechecked the standard and I agree that we should use "filter
expression" whenever possible.
"A filter expression must be enclosed in parentheses..." looks like an
oversight, so I fixed it. As for what's actually enclosed, I believe we
can still use the word "condition" here as it's easy to understand and
is already used in our docs, e.g. in description of the WHERE clause
that serves a similar purpose.
The new version of the patch fixes the terminology, tweaks the examples,
and provides some grammar and style fixes in the jsonpath-related chapters.

--
Liudmila Mantrova
Technical writer at Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
0004-clarify-jsonpath-docs-3.patch text/x-patch 9.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-07-03 14:29:23 Re: [PATCH v4] Add \warn to psql
Previous Message Tom Lane 2019-07-03 14:06:08 Re: [PATCH v4] Add \warn to psql