Re: Jsonpath ** vs lax mode

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Thomas Kellerer <shammat(at)gmx(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Jsonpath ** vs lax mode
Date: 2021-01-25 15:31:01
Message-ID: CAPpHfdv=psCFAiwKD_YBBpn1xObUe5DpSDwEDheBtfarYu0m0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 21, 2021 at 12:38 PM Thomas Kellerer <shammat(at)gmx(dot)net> wrote:
> Alexander Korotkov schrieb am 20.01.2021 um 18:13:
> > We have a bug report which says that jsonpath ** operator behaves strangely in the lax mode [1].
> That report was from me ;)
>
> Thanks for looking into it.
>
> > At first sight, we may just say that lax mode just sucks and
> > counter-intuitive results are expected. But at the second sight, the
> > lax mode is used by default and current behavior may look too
> > surprising.
>
> I personally would be fine with the manual stating that the Postgres extension
> to the JSONPath processing that allows a recursive lookup using ** requires strict
> mode to work properly.
>
> It should probably be documented in chapter 9.16.2 "The SQL/JSON Path Language",
> maybe with a little warning in the description of jsonb_path_query** and in
> chapter 8.14.16 as well (or at least that's were I would expect such a warning)

Thank you for reporting :)

Yeah, documenting the current behavior is something "must have". If
even we find the appropriate behavior change, I don't think it would
be backpatchable. But we need to backpatch the documentation for
sure. So, let's start by fixing the docs.

------
Regards,
Alexander Korotkov

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2021-01-25 15:33:50 Re: Jsonpath ** vs lax mode
Previous Message Alexander Korotkov 2021-01-25 15:24:52 Re: Phrase search vs. multi-lexeme tokens