Re: Patch bug: Fix jsonpath .* on Arrays - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Patch bug: Fix jsonpath .* on Arrays
Date
Msg-id 978C7F05-3EE1-40AE-92BB-AAF86B9F16CF@justatheory.com
Whole thread Raw
In response to Re: Patch bug: Fix jsonpath .* on Arrays  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Patch bug: Fix jsonpath .* on Arrays
Re: Patch bug: Fix jsonpath .* on Arrays
List pgsql-hackers
On Jun 4, 2024, at 12:28 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:

> This seems to be working correctly. Lax mode causes the first array level to unwrap and produce new context item
values. Then the wildcard member accessor is applied to each.  Numbers don’t have members so no matches exist in the
firstexample.  The object in the second indeed has a single member and so matches the wildcard and its value, the
array,is returned. 

Oh FFS, unwrapping still breaks my brain. You’re right, of course. Here’s a new patch that demonstrates that behavior,
sincethat code path is not currently represented in tests AFAICT (I would have expected to have broken it with this
patch).

D


Attachment

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Pgoutput not capturing the generated columns
Next
From: Ajin Cherian
Date:
Subject: Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding