diff options
| author | Amit Langote <amitlan@postgresql.org> | 2025-11-27 10:43:29 +0900 |
|---|---|---|
| committer | Amit Langote <amitlan@postgresql.org> | 2025-11-27 12:07:01 +0900 |
| commit | 519fa0433b37701b357753a568080bee2c47d238 (patch) | |
| tree | 8eb58cf164175912e4233996585cc022d7c335e1 /src/common | |
| parent | 0ca3b16973a8bb1c185f56e65edcadc0d9d2c406 (diff) | |
Fix error reporting for SQL/JSON path type mismatches
transformJsonFuncExpr() used exprType()/exprLocation() on the
possibly coerced path expression, which could be NULL when
coercion to jsonpath failed, leading to "cache lookup failed
for type 0" errors.
Preserve the original expression node so that type and location
in the "must be of type jsonpath" error are reported correctly.
Add regression tests to cover these cases.
Reported-by: Jian He <jian.universality@gmail.com>
Author: Jian He <jian.universality@gmail.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Discussion: https://postgr.es/m/CACJufxHunVg81JMuNo8Yvv_hJD0DicgaVN2Wteu8aJbVJPBjZA@mail.gmail.com
Backpatch-through: 17
Diffstat (limited to 'src/common')
0 files changed, 0 insertions, 0 deletions
