Re: More jsonpath methods: translate, split, join - Mailing list pgsql-hackers

From Florents Tselai
Subject Re: More jsonpath methods: translate, split, join
Date
Msg-id CA+v5N41c+9G7iRZ1sev6ZNbNLdNCtkB0uvYw9baS6WBNEfcigg@mail.gmail.com
Whole thread
In response to Re: More jsonpath methods: translate, split, join  (Florents Tselai <florents.tselai@gmail.com>)
List pgsql-hackers



On Sat, Jun 27, 2026 at 8:40 AM Florents Tselai <florents.tselai@gmail.com> wrote:


On Fri, Jun 26, 2026 at 11:19 PM Zsolt Parragi <zsolt.parragi@percona.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


Attachment

pgsql-hackers by date:

Previous
From: Bertrand Drouvot
Date:
Subject: Re: Re-read subscription state after lock in AlterSubscription
Next
From: Henson Choi
Date:
Subject: Re: Row pattern recognition