pgsql: Rationalize and improve error messages for some jsonpath items

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Rationalize and improve error messages for some jsonpath items
Date: 2024-02-27 08:37:15
Message-ID: E1resxf-000zRY-Bi@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Rationalize and improve error messages for some jsonpath items

This is a followup to commit 66ea94e8e6.

Error mssages concerning incorrect formats for date-time types are
unified and parameterized, instead of using a fully separate error
message for each type.

Similarly, error messages regarding numeric and string arguments to
certain items are standardized, and instead of saying that the argument
is out of range simply say that it is invalid. The actual invalid
arguments to these itesm are now shown in the error message.

Error messages relating to numeric inputs of Nan or Infinity are
made more informative.

Jeevan Chalke and Kyotaro Horiguchi, with some input from Tom Lane.

Discussion: https://postgr.es/m/20240129.121200.235012930453045390.horikyota.ntt@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/92d2ab7554f92b841ea71bcc72eaa8ab11aae662

Modified Files
--------------
src/backend/utils/adt/jsonpath_exec.c | 86 +++++++++++++++-----------
src/test/regress/expected/jsonb_jsonpath.out | 90 ++++++++++++++--------------
2 files changed, 95 insertions(+), 81 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2024-02-27 15:45:59 pgsql: Fix comments for the dshash_parameters struct.
Previous Message Michael Paquier 2024-02-27 06:18:38 pgsql: Remove unnecessary array object_classes[] in dependency.c