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 89D1222A-B225-4A9C-A0EC-98A46F2F4A07@justatheory.com
Whole thread Raw
In response to Re: Patch bug: Fix jsonpath .* on Arrays  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Patch bug: Fix jsonpath .* on Arrays
List pgsql-hackers
On Jul 19, 2024, at 01:42, Michael Paquier <michael@paquier.xyz> wrote:

> Sorry for the delay.  Finally came back to it, and applied the tests.
> Thanks!

Awesome, thank you!

> It was fun to see that HEAD was silenced with the first patch of this
> thread that tweaked the behavior with arrays.

Uh, what? Sorry I don’t follow.

> Regarding the comments, I have left them out for now.  That may be a
> good start, but it also feels like we should do a much better job
> overall with the area of jsonpath_exec.c.

I put them in because it took me a bit to track down that they were among the implementors of JsonPathGetVarCallback as
Iwas porting the code. 

> One thing that may help as
> a start is to reorganize the routines of the file and divide them into
> sub-categories, or even go through a deeper refactoring to help
> readers go through the existing 4.5k lines of code that are in this
> single file..

After I got all the tests passing in the port to Go, I split it up into 14 implementation and 15 test files (with all
ofjsonb_jsonpath.(sql.out) in one file). Was much easier to reason about that way. 

https://github.com/theory/sqljson/tree/main/path/exec

Best,

David





pgsql-hackers by date:

Previous
From: Thomas Simpson
Date:
Subject: Re: Enhance pg_dump multi-threaded streaming (WAS: Re: filesystem full during vacuum - space recovery issues)
Next
From: "David E. Wheeler"
Date:
Subject: Re: jsonpath: Inconsistency of timestamp_tz() Output