aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonpath_exec.c
diff options
context:
space:
mode:
authorAmit Langote <amitlan@postgresql.org>2024-04-18 14:46:35 +0900
committerAmit Langote <amitlan@postgresql.org>2024-04-18 14:46:35 +0900
commitc0fc0751862d4e9b7ca9d51f2cd79344690ec873 (patch)
treed87f30e1dafd1fa0c8713f7ced105719447f654e /src/backend/utils/adt/jsonpath_exec.c
parentb4fad46b6bc8a9bf46ff689bcb1bd4edf8f267af (diff)
downloadpostgresql-c0fc0751862d4e9b7ca9d51f2cd79344690ec873.tar.gz
postgresql-c0fc0751862d4e9b7ca9d51f2cd79344690ec873.zip
SQL/JSON: Fix issues with DEFAULT .. ON ERROR / EMPTY
SQL/JSON query functions allow specifying an expression to return when either of ON ERROR or ON EMPTY condition occurs when evaluating the JSON path expression. The parser (transformJsonBehavior()) checks that the specified expression is one of the supported expressions, but there are two issues with how the check is done that are fixed in this commit: * No check for some expressions related to coercion, such as CoerceViaIO, that may appear in the transformed user-specified expressions that include cast(s) * An unsupported expression may be masked by a coercion-related expression, which must be flagged by checking the latter's argument expression recursively Author: Jian He <jian.universality@gmail.com> Author: Amit Langote <amitlangote09@gmail.com> Reported-by: Jian He <jian.universality@gmail.com> Discussion: https://postgr.es/m/CACJufxEqhqsfrg_p7EMyo5zak3d767iFDL8vz_4%3DZBHpOtrghw@mail.gmail.com Discussion: https://postgr.es/m/CACJufxGOerH1QJknm1noh-Kz5FqU4p7QfeZSeVT2tN_4SLXYNg@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/jsonpath_exec.c')
0 files changed, 0 insertions, 0 deletions