From: Michael Paquier <michael@paquier.xyz>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: SQL/JSON query functions
Date: Sat, 2 Apr 2022 12:15:44 +0900
Message-ID: <Yke/4OgCaK/HijBj@paquier.xyz> (raw)
In-Reply-To: <E1nZIuG-001xDg-KJ@gemulon.postgresql.org>
References: <E1nZIuG-001xDg-KJ@gemulon.postgresql.org>
Hi Andrew,
On Tue, Mar 29, 2022 at 08:57:37PM +0000, Andrew Dunstan wrote:
> SQL/JSON query functions
>
> This introduces the SQL/JSON functions for querying JSON data using
> jsonpath expressions. The functions are:
>
> JSON_EXISTS()
> JSON_QUERY()
> JSON_VALUE()
>
> All of these functions only operate on jsonb. The workaround for now is
> to cast the argument to jsonb.
>
> JSON_EXISTS() tests if the jsonpath expression applied to the jsonb
> value yields any values. JSON_VALUE() must return a single value, and an
> error occurs if it tries to return multiple values. JSON_QUERY() must
> return a json object or array, and there are various WRAPPER options for
> handling scalar or multi-value results. Both these functions have
> options for handling EMPTY and ERROR conditions.
Some of the tests introduced in this commit are a bit unstable when
run through a primary/standby setup. conchuela has showed one failure
today:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=conchuela&dt=2022-04-02%2002%3A36%3A03
Thanks,
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, andrew@dunslane.net
Subject: Re: pgsql: SQL/JSON query functions
In-Reply-To: <Yke/4OgCaK/HijBj@paquier.xyz>
References: <E1nZIuG-001xDg-KJ@gemulon.postgresql.org> <Yke/4OgCaK/HijBj@paquier.xyz>
* 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