Re: transformJsonFuncExpr pathspec cache lookup failed

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: transformJsonFuncExpr pathspec cache lookup failed
Date: 2025-11-19 02:55:07
Message-ID: CACJufxHBjjP_=KMOuVqHJU4MJaRBi1pse2B9M=-VTwTJBp-zYg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 7, 2025 at 2:26 PM Kirill Reshke <reshkekirill(at)gmail(dot)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.

Attachment Content-Type Size
v2-0001-fix-transformJsonFuncExpr-pathspec-cache-lookup-failure.patch text/x-patch 4.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-11-19 03:13:00 Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement
Previous Message Thomas Munro 2025-11-19 02:50:44 Re: PRI?64 vs Visual Studio (2022)