Re: ON ERROR in json_query and the like - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: ON ERROR in json_query and the like
Date
Msg-id CAKFQuwb50BAaj83Np+1O6xe3_T6DO8w2mxtFbgSbbUng+abrqA@mail.gmail.com
Whole thread Raw
In response to Re: ON ERROR in json_query and the like  (Markus Winand <markus.winand@winand.at>)
List pgsql-hackers
On Wednesday, June 12, 2024, Markus Winand <markus.winand@winand.at> wrote:

10.14 SR 1: The declared type of the <value expression> simply contained in the <JSON input expression> immediately contained in the <JSON context item> shall be a string type or a JSON type.  

It might be best to think of it as two separate functions, overloaded:

JSON_VALUE(context_item JSONB, path_expression …)
JSON_VALUE(context_item TEXT, path_expression …)

Yes, we need to document that we deviate from (fail to fully implement) the standard here in that we only provide jsonb parameter functions, not text ones.

David J.

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: CI and test improvements
Next
From: Markus Winand
Date:
Subject: Re: ON ERROR in json_query and the like