pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <amitlan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: SQL/JSON: Document behavior when input document is not jsonb
Date: Fri, 28 Jun 2024 00:46:29 +0000
Message-ID: <E1sMzky-003IIp-Fh@gemulon.postgresql.org> (raw)

SQL/JSON: Document behavior when input document is not jsonb

The input document to functions JSON_EXISTS(), JSON_QUERY(),
JSON_VALUE(), and JSON_TABLE() can be specified as character or
UTF8-encoded bytea strings. These are automatically converted to
jsonb with an implicit cast before being passed to the jsonpath
machinery.

In the current implementation, errors that occur when parsing the
specified string into a valid JSON document are thrown
unconditionally. This means they are not subject to the explicit or
implicit ON ERROR clause of those functions, which is a standard-
conforming behavior.  Add a note to the documentation to mention
that.

Reported-by: Markus Winand
Discussion: https://postgr.es/m/F7DD1442-265C-4220-A603-CB0DEB77E91D%40winand.at

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/473a352fb393519f22cd4d31839ad3d74b1aeea1

Modified Files
--------------
doc/src/sgml/func.sgml | 10 ++++++++++
1 file changed, 10 insertions(+)



Message-ID: <E1sMzky-003IIp-Fh@gemulon.postgresql.org>
Permalink:  ../E1sMzky-003IIp-Fh@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sMzky-003IIp-Fh@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: amitlan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: SQL/JSON: Document behavior when input document is not jsonb
  In-Reply-To: <E1sMzky-003IIp-Fh@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox