Re: pgsql: Don't include CaseTestExpr in JsonValueExpr.formatted_expr

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Amit Langote <amitlan(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Don't include CaseTestExpr in JsonValueExpr.formatted_expr
Date: 2023-07-13 13:33:02
Message-ID: CA+HiwqGDnitCbR4qydu7DTbbCyt2p2nnbZ9s9Jqi1P+Us-k41w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Jul 13, 2023 at 5:12 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> 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.

Andrew just mentioned that to me off-list too. I've just pushed a fix.

--
Thanks, Amit Langote
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Langote 2023-07-13 13:39:10 pgsql: Add missing const qualifier
Previous Message Amit Langote 2023-07-13 13:26:52 pgsql: Fix code indentation violation in commit b6e1157e7d