| From: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
|---|---|
| To: | Florents Tselai <florents(dot)tselai(at)gmail(dot)com> |
| Cc: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: More jsonpath methods: translate, split, join |
| Date: | 2026-07-29 04:37:38 |
| Message-ID: | CADkLM=fTmNbN5yA3G_suvr6-gAPc3JBEBxfybO=5_9pQ6R=mOA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, Jul 4, 2026 at 4:59 AM Florents Tselai <florents(dot)tselai(at)gmail(dot)com>
wrote:
>
>
>
> On Sat, Jun 27, 2026 at 8:40 AM Florents Tselai <florents(dot)tselai(at)gmail(dot)com>
> wrote:
>
>>
>>
>> On Fri, Jun 26, 2026 at 11:19 PM Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
>> wrote:
>>
>>> + binary_jbv.type = jbvBinary;
>>> + binary_jbv.val.binary.data =
>>> &jb_result->root;
>>> + binary_jbv.val.binary.len =
>>> VARSIZE(jb_result);
>>>
>>> Shouldn't that use VARSIZE_ANY_EXHDR or VARSIZE(jb_result) - VARHDRSZ?
>>>
>>
>> I think you're right; let's see if Corey comes back with anything else
>> before I send out a new version.
>>
>
> Here's a v5 that fixes the VARSIZE_ANY_EXHDR Zsolt mentioned above
> I've also rearranged the test cases in jsonpath.sql and jsonb_jsonpath.sql
> Also added parser error test cases that were missing for translate() in
> jsonpath.sql
>
Apologies for the delay.
jsonpath.h: I see that all new enum values are now addedto the end. Good.
jsonpath.c: I see that the new cases are clustered together where it makes
sense. The individual cases are a bit jumbled when viewed all at once, so
while I don't think this makes for bad end-result code, I do think the
patch should be split into 3, one for each new function, or at least split
translate() out to its own patch if you think the code that split/join
share makes separating them inelegant. The more morsel-sized the patch(es),
the easier it is for the committer.
jsonb_jsonpath.out/sql: Comment on empty string delimiter test makes sense
now.
The silent mode tests seem adequate.
I see that the commitfest entry has been marked ready for committer. I
think that's slightly premature, so I'm updating the status for now.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-07-29 04:54:34 | Re: Fix race in background worker termination for database |
| Previous Message | Tom Lane | 2026-07-29 04:35:39 | Re: Missing list_free in publicationcmds.c:OpenTableList |