Re: More jsonpath methods: translate, split, join

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: More jsonpath methods: translate, split, join
Date: 2026-06-19 20:42:56
Message-ID: CAN4CZFMGKt2=QnGJ74yU_Ds1dDT29abgoZUspq20szAgbRHF4A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

+ /* Validate target is an array */
+ if (JsonbType(jb) != jbvArray)
+ {
+ RETURN_ERROR(ereport(ERROR,
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ errmsg("jsonpath item method .join() can only be applied
to an array"))));

Other methods seem to use ERRCODE_SQL_JSON_ARRAY_NOT_FOUND

+ else
+ {
+ /* Recursive Tree (jbvArray) */
+ for (int i = 0; i < jb->val.array.nElems; i++)

Isn't this branch unreachable?

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message David G. Johnston 2026-06-19 20:02:08 Re: Fix \crosstabview to honor \pset display_true/display_false