From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add more test coverage for jsonpath "$.*" with arrays
Date: Fri, 19 Jul 2024 05:18:25 +0000
Message-ID: <E1sUg0f-000E63-Al@gemulon.postgresql.org> (raw)
Add more test coverage for jsonpath "$.*" with arrays
There was no coverage for the code path to unwrap an array before
applying ".*" to it, so add tests to provide more coverage for both
objects and arrays.
This shows, for example, that no results are returned for an array of
scalars, and what results are returned when the array contains an
object. A few more scenarios are covered with the strict/lax modes and
the operator "@?".
Author: David Wheeler
Reported-by: David G. Johnston, Stepan Neretin
Discussion: https://postgr.es/m/A95346F9-6147-46E0-809E-532A485D71D6@justatheory.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3a137ab7e575b683c410c46312799a4d88e2b2f2
Modified Files
--------------
src/test/regress/expected/jsonb_jsonpath.out | 50 ++++++++++++++++++++++++++++
src/test/regress/sql/jsonb_jsonpath.sql | 11 ++++++
2 files changed, 61 insertions(+)
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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add more test coverage for jsonpath "$.*" with arrays
In-Reply-To: <E1sUg0f-000E63-Al@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