From: Michael Paquier <michael@paquier.xyz>
To: Amit Langote <amitlan@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Don't include CaseTestExpr in JsonValueExpr.formatted_expr
Date: Thu, 13 Jul 2023 17:11:55 +0900
Message-ID: <ZK+xy0D4VagfDOCt@paquier.xyz> (raw)
In-Reply-To: <E1qJn4l-00072K-8q@gemulon.postgresql.org>
References: <E1qJn4l-00072K-8q@gemulon.postgresql.org>
Hi Amit,
On Thu, Jul 13, 2023 at 03:33:07AM +0000, Amit Langote wrote:
> Don't include CaseTestExpr in JsonValueExpr.formatted_expr
>
> A CaseTestExpr is currently being put into
> JsonValueExpr.formatted_expr as placeholder for the result of
> evaluating JsonValueExpr.raw_expr, which in turn is evaluated
> separately. Though, there's no need for this indirection if
> raw_expr itself can be embedded into formatted_expr and evaluated
> as part of evaluating the latter, especially as there is no
> special reason to evaluate it separately. So this commit makes it
> so. As a result, JsonValueExpr.raw_expr no longer needs to be
> evaluated in ExecInterpExpr(), eval_const_exprs_mutator() etc. and
> is now only used for displaying the original "unformatted"
> expression in ruleutils.c.
koel is unhappy after this commit:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=koel&dt=2023-07-13%2006%3A49%3A03
This code is not indented properly.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, amitlan@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Don't include CaseTestExpr in JsonValueExpr.formatted_expr
In-Reply-To: <ZK+xy0D4VagfDOCt@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox