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 E862A9FB-E09A-428C-B27E-6671B05A845A@justatheory.com
Whole thread Raw
In response to Re: Patch bug: Fix jsonpath .* on Arrays  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: Patch bug: Fix jsonpath .* on Arrays
List pgsql-hackers
On Jun 25, 2024, at 13:48, David E. Wheeler <david@justatheory.com> wrote:

> I have since realized it’s not a complete fix for the issue, and hacked around it in my Go version. Would be fine to
removethat bit, but IIRC this was the only execution function that would return `jperNotFound` when it in fact adds
itemsto the `found` list. The current implementation only looks at one or the other, so it’s not super important, but I
foundthe inconsistency annoying and sometimes confusing. 

I’ve removed this change.

>> [1] select jsonb_path_query('[1,2,3,{"b": [3,4,5]}]', 'strict $.*');
>> I propose adding a similar test with explicitly specified lax mode: select jsonb_path_query('[1,2,3,{"b":
[3,4,5]}]','lax $.*'); to show what lax mode is set by default. 
>
> Very few of the other tests do so; I can add it if it’s important for this case, though.

Went ahead and added lax.

> @? suppresses a number of errors. Perhaps I should add a variant of the error-raising query that passes the silent
arg,which would also suppress the error. 

Added a variant where the silent param suppresses the error, too.

V2 attached and the PR updated:

  https://github.com/theory/postgres/pull/4/files

Best,

David




Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: JIT causes core dump during error recovery
Next
From: Ranier Vilela
Date:
Subject: Re: JIT causes core dump during error recovery