Re: Jsonpath ** vs lax mode - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Jsonpath ** vs lax mode
Date
Msg-id CAPpHfds5jg1xxJTU9tuseL_nTKpUEHt0ivL65Fn7Sq=LQJC4bA@mail.gmail.com
Whole thread Raw
In response to Re: Jsonpath ** vs lax mode  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Jsonpath ** vs lax mode
List pgsql-hackers
Hi, Alvaro!

Thank you for your feedback.

On Wed, Jan 20, 2021 at 9:16 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> On 2021-Jan-20, Alexander Korotkov wrote:
>
> > My proposal is to make everything after the ** operator use strict mode
> > (patch attached).  I think this shouldn't be backpatched, just applied to
> > the v14.  Other suggestions?
>
> I think changing the mode midway through the operation is strange.  What
> do you think of requiring for ** that mode is strict?  That is, if ** is
> used and the mode is lax, an error is thrown.

Yes, changing mode in midway is a bit strange.

Requiring strict mode for ** is a solution, but probably too restrictive...

What do you think about making just subsequent accessor after ** not
to unwrap arrays.  That would be a bit tricky to implement, but
probably that would better satisfy the user needs.

------
Regards,
Alexander Korotkov



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Wrong usage of RelationNeedsWAL
Next
From: Thomas Kellerer
Date:
Subject: Re: Jsonpath ** vs lax mode