Re: Shouldn't jsonpath .string() Unwrap?

From: Chapman Flack <jcflack(at)acm(dot)org>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
Subject: Re: Shouldn't jsonpath .string() Unwrap?
Date: 2024-06-14 01:55:04
Message-ID: 666BA2F8.6030707@acm.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/13/24 18:45, David E. Wheeler wrote:
> On Jun 13, 2024, at 3:53 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>> Hmm. You might be right. Many of these items have this code, but the string() branch does not:
>> if (unwrap && JsonbType(jb) == jbvArray)
>> return executeItemUnwrapTargetArray(cxt, jsp, jb, found,
>> false);
>
> Exactly, would be pretty easy to add. I can work up a patch this weekend.

My opinion is yes, that should be done. 9.46, umm, General
Rule 11 g ii 6) A) says just "if MODE is lax and <JSON method> is not
type or size, then let BASE be Unwrap(BASE)." No special exemption
there for string(), nor further below at C) XV) for the operation
of string().

Regards,
-Chap

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2024-06-14 01:58:57 Re: jsonpath: Missing Binary Execution Path?
Previous Message David G. Johnston 2024-06-14 01:46:15 Re: jsonpath: Missing Binary Execution Path?