From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Simplify executor's handling of CaseTestExpr & CoerceToDomainVal
Date: Thu, 30 Jan 2025 18:21:50 +0000
Message-ID: <E1tdZAj-004SsX-Sj@gemulon.postgresql.org> (raw)
Simplify executor's handling of CaseTestExpr & CoerceToDomainValue.
Instead of deciding at runtime whether to read from casetest.value
or caseValue_datum, split EEOP_CASE_TESTVAL into two opcodes and
make the decision during expression compilation. Similarly for
EEOP_DOMAIN_TESTVAL. This actually results in net less code,
mainly because llvmjit_expr.c's code for handling these opcodes
gets shorter. The performance gain is doubtless negligible, but
this seems worth changing anyway on grounds of simplicity and
understandability.
Author: Andreas Karlsson <andreas@proxel.se>
Co-authored-by: Xing Guo <higuoxing@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CACpMh+AiBYAWn+D1aU7Rsy-V1tox06Cbc0H3qA7rwL5zdJ=anQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/115a365519bfd53a65bf17d253b26902eff0c337
Modified Files
--------------
src/backend/executor/execExpr.c | 34 ++++++++++++--------
src/backend/executor/execExprInterp.c | 59 ++++++++++++++---------------------
src/backend/jit/llvm/llvmjit_expr.c | 56 ++++++++++-----------------------
src/include/executor/execExpr.h | 2 ++
4 files changed, 63 insertions(+), 88 deletions(-)
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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Simplify executor's handling of CaseTestExpr & CoerceToDomainVal
In-Reply-To: <E1tdZAj-004SsX-Sj@gemulon.postgresql.org>
* 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