Re: [PATCH] WIP: replace method for jsonpath - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: [PATCH] WIP: replace method for jsonpath
Date
Msg-id AF182BC8-158F-4215-812D-F6EDBA37BF09@justatheory.com
Whole thread Raw
Responses Re: [PATCH] WIP: replace method for jsonpath
List pgsql-hackers
On Sep 16, 2024, at 18:39, Florents Tselai <florents.tselai@gmail.com> wrote:

> Here’s an updated version of this patch.

Oh, nice function.

But a broader question for hackers: Is replace() specified in the SQL/JSON spec? If not, what’s the process for
evaluatingwhether or not to add features not specified by the spec? 

> As a future note:
> It’s worth noting that both this newly added jspItem and other ones like (jpiDecimal, jpiString)
> use jspGetRightArg and jspGetLeftArg.
> left and right can be confusing if more complex methods are added in the future.
> i.e. jsonpath methods with nargs>=3 .
> I was wondering if we’d like something like JSP_GETARG(n)

So far I think we have only functions defined by the spec, which tend to be unary or binary, so left and right haven’t
beenan issue. 

Best,

David




pgsql-hackers by date:

Previous
From: Marcos Pegoraro
Date:
Subject: Re: Detailed release notes
Next
From: Florents Tselai
Date:
Subject: Re: [PATCH] WIP: replace method for jsonpath