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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: e3c1393) | patch
SQL/JSON: Validate values in ON ERROR/EMPTY clauses
2024年6月28日 04:59:57 +0000 (13:59 +0900)
2024年6月28日 05:01:43 +0000 (14:01 +0900)
commit 55e56c84da99fe7becda2194563f48bb3083c2d1
SQL/JSON: Validate values in ON ERROR/EMPTY clauses

Currently, the grammar allows any supported values in the ON ERROR
and ON EMPTY clauses for SQL/JSON functions, regardless of whether
the values are appropriate for the function. This commit ensures
that during parse analysis, the provided value is checked for
validity for the given function and throws a syntax error if it is
not.

While at it, this fixes some omissions in the documentation of the
ON ERROR/EMPTY clauses for JSON_TABLE().

Reported-by: Jian He <jian.universality@gmail.com>
Reviewed-by: Jian He <jian.universality@gmail.com>
Discussion: https://postgr.es/m/CACJufxFgWGqpESSYzyJ6tSurr3vFYBSNEmCfkGyB_dMdptFnZQ%40mail.gmail.com
doc/src/sgml/func.sgml 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/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
src/test/regress/sql/sqljson_queryfuncs.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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