Re: jsonpath: Missing Binary Execution Path?

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Chapman Flack <jcflack(at)acm(dot)org>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: jsonpath: Missing Binary Execution Path?
Date: 2024-06-14 13:59:45
Message-ID: C9C53667-D6B4-4B0A-ADD0-292388FFD2DB@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jun 13, 2024, at 22:31, Chapman Flack <jcflack(at)acm(dot)org> wrote:

> It's baked right into the standard grammar: || can only have a
> <JSON boolean conjunction> on its right and a <JSON boolean disjunction>
> on its left.
>
> && can only have a <JSON boolean negation> on its right and a
> <JSON boolean conjunction> on its left.

Wow.

> The case for ! is even more limiting: it can't be applied to anything
> but a <JSON delimited predicate>. That can be either the exists predicate,
> or, any other <JSON path predicate> but wrapped in parentheses.
>
> The language seems sort of gappy in the same way XPath 1.0 was. XPath 2.0
> became much more consistent and conceptually unified, only by that time,
> XML was old school, and JSON was cool, and apparently started inventing
> a path language.

I suppose that’s the reason for this design. But if these sorts of limitations were changed in XPath, perhaps SQL-Next could fix them, too.

Thanks for citing the standard; super helpful.

D

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2024-06-14 14:36:54 Re: CI and test improvements
Previous Message Maxim Orlov 2024-06-14 13:56:44 Bugfix and improvements in multixact.c