Re: transformJsonFuncExpr pathspec cache lookup failed
| От | Amit Langote |
|---|---|
| Тема | Re: transformJsonFuncExpr pathspec cache lookup failed |
| Дата | |
| Msg-id | CA+HiwqE9KhWkpg3MfnkJu9MPsA-Z-MHRPyfPoK=hUoneRaeLbQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: transformJsonFuncExpr pathspec cache lookup failed (jian he <jian.universality@gmail.com>) |
| Ответы |
Re: transformJsonFuncExpr pathspec cache lookup failed
Re: transformJsonFuncExpr pathspec cache lookup failed |
| Список | pgsql-hackers |
Hi, On Wed, Nov 19, 2025 at 11:55 AM jian he <jian.universality@gmail.com> wrote: > 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. I agree, though I prefer a different name for that coerced_* variable. Also, let’s define the _type and _loc variables inside the error block. Updated patch attached. Please feel free to post a patch for the 2nd issue. -- Thanks, Amit Langote
Вложения
В списке pgsql-hackers по дате отправления: