Re: transformJsonFuncExpr pathspec cache lookup failed
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: Kirill Reshke <reshkekirill@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-11-19T02:55:07Z
Lists: pgsql-hackers
Attachments
- v2-0001-fix-transformJsonFuncExpr-pathspec-cache-lookup-failure.patch (text/x-patch) patch v2-0001
On Fri, Nov 7, 2025 at 2:26 PM Kirill Reshke <reshkekirill@gmail.com> wrote: > > Hi! > I tried your fix and this indeed fixes an issue. Two minor comments: > > First, > in the `src/backend/parser/parse_expr.c` fil there are multiple > examples of working with `coerce_to_target_type`, they all share > different coding practice: > > ``` > coerced_expr = coerce_to_target_type(.., expr, ..) > > if (coerced_expr == NULL) > ereport(); > > > expr = coerced_expr; > ``` > > Instead of > ``` > expr = coerce_to_target_type(.., expr, ..) > > if (expr == NULL) > ereport(); > ``` > > Let's be consistent? > IMHO, > coerced_expr = coerce_to_target_type(.., expr, ..) is better than > expr = coerce_to_target_type(.., expr, ..) I changed accordingly.
Commits
-
Fix error reporting for SQL/JSON path type mismatches
- 519fa0433b37 19 (unreleased) landed
- 15ba0702c1ae 18.2 landed
- b5511fed500e 17.8 landed