Rationalize and improve error messages for some jsonpath items
authorAndrew Dunstan
Tue, 27 Feb 2024 06:31:40 +0000 (01:31 -0500)
committerAndrew Dunstan
Tue, 27 Feb 2024 07:07:22 +0000 (02:07 -0500)
commit92d2ab7554f92b841ea71bcc72eaa8ab11aae662
treef4894b55f51773cc9bd52138b0becdfb915ff3d4
parentef5e2e90859a39efdd3a78e528c544b585295a78
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[email protected]
src/backend/utils/adt/jsonpath_exec.c
src/test/regress/expected/jsonb_jsonpath.out