Re: [PATCH] WIP: replace method for jsonpath

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Florents Tselai <florents(dot)tselai(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] WIP: replace method for jsonpath
Date: 2024-09-17 18:40:57
Message-ID: AF182BC8-158F-4215-812D-F6EDBA37BF09@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sep 16, 2024, at 18:39, Florents Tselai <florents(dot)tselai(at)gmail(dot)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 evaluating whether 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 been an issue.

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-09-17 18:48:10 Re: Compress ReorderBuffer spill files using LZ4
Previous Message Marcos Pegoraro 2024-09-17 18:29:54 Re: Detailed release notes