From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, Oleg Bartunov <obartunov(at)postgrespro(dot)ru>, Teodor Sigaev <teodor(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Jsonpath ** vs lax mode |
Date: | 2021-01-28 21:44:17 |
Message-ID: | CAPpHfdux0HdL5iVBiUoKaDdgDhaRa1k8t4=_U43EDbE8KOUXJg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 25, 2021 at 6:33 PM Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:
> On Thu, Jan 21, 2021 at 4:35 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> > On 2021-Jan-21, Alexander Korotkov wrote:
> >
> > > 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.
> >
> > Hmm, why is it too restrictive? If the user needs to further drill into
> > the JSON, can't they chain json_path_query calls, specifying (or
> > defaulting to) lax mode for the part doesn't include the ** expression?
>
> For sure, there are some walkarounds. But I don't think all the
> lax-mode queries involving ** are affected. So, it might happen that
> we force users to use strict-mode or chain call even if it's not
> necessary. I'm tending to just fix the doc and wait if there are mode
> complaints :)
The patch, which clarifies this situation in the docs is attached.
I'm going to push it if no objections.
------
Regards,
Alexander Korotkov
Attachment | Content-Type | Size |
---|---|---|
jsonpath-double-star-lax-docs.patch | application/octet-stream | 1.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2021-01-28 22:10:35 | Re: Allow matching whole DN from a client certificate |
Previous Message | Mark Rofail | 2021-01-28 21:41:43 | Re: [HACKERS] GSoC 2017: Foreign Key Arrays |