Re: Shouldn't jsonpath .string() Unwrap? - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: Shouldn't jsonpath .string() Unwrap?
Date
Msg-id 666BA2F8.6030707@acm.org
Whole thread Raw
In response to Re: Shouldn't jsonpath .string() Unwrap?  (David E. Wheeler <david@justatheory.com>)
Responses Re: Shouldn't jsonpath .string() Unwrap?
List pgsql-hackers
On 06/13/24 18:45, David E. Wheeler wrote:
> On Jun 13, 2024, at 3:53 PM, Andrew Dunstan <andrew@dunslane.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



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: jsonpath: Missing Binary Execution Path?
Next
From: Chapman Flack
Date:
Subject: Re: jsonpath: Missing Binary Execution Path?