git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 40126ac) | patch
SQL/JSON: Improve some error messages
2024年4月18日 05:33:47 +0000 (14:33 +0900)
2024年4月18日 05:45:48 +0000 (14:45 +0900)
commit b4fad46b6bc8a9bf46ff689bcb1bd4edf8f267af
SQL/JSON: Improve some error messages

This improves some error messages emitted by SQL/JSON query functions
by mentioning column name when available, such as when they are
invoked as part of evaluating JSON_TABLE() columns. To do so, a new
field column_name is added to both JsonFuncExpr and JsonExpr that is
only populated when creating those nodes for transformed JSON_TABLE()
columns.

While at it, relevant error messages are reworded for clarity.

Reported-by: Jian He <jian.universality@gmail.com>
Suggested-by: Jian He <jian.universality@gmail.com>
Discussion: https://postgr.es/m/CACJufxG_e0QLCgaELrr2ZNz7AxPeGCNKAORe3fHtFCQLsH4J4Q@mail.gmail.com
src/backend/executor/execExprInterp.c diff | blob | blame | history
src/backend/parser/parse_expr.c diff | blob | blame | history
src/backend/parser/parse_jsontable.c diff | blob | blame | history
src/backend/utils/adt/jsonpath_exec.c diff | blob | blame | history
src/include/nodes/parsenodes.h diff | blob | blame | history
src/include/nodes/primnodes.h diff | blob | blame | history
src/include/utils/jsonpath.h diff | blob | blame | history
src/test/regress/expected/sqljson_jsontable.out diff | blob | blame | history
src/test/regress/expected/sqljson_queryfuncs.out diff | blob | blame | history
src/test/regress/sql/sqljson_jsontable.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /