Re: JIT: The nullness of casetest.value can be determined at the JIT compile time.

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Xing Guo <higuoxing@gmail.com>, Andreas Karlsson <andreas@proxel.se>, pgsql-hackers@lists.postgresql.org
Date: 2025-01-30T03:29:32Z
Lists: pgsql-hackers
Heikki Linnakangas <hlinnaka@iki.fi> writes:
> Huge +1 for cleaning up this abuse of caseValue_datum/domainValue_datum. 
> While correct and sensible if we continue the abuse, these patches feel 
> like putting lipstick on a pig.

Agreed.  I spent some time trying to do it better, with results
shown at [1].  If we adopt that idea, then the executor's support
for CaseTestExpr will go away, so there's little point in pursuing
that half of the patch given here.  However, I concluded that there's
insufficient reason to redesign CoerceToDomainValue, so we could
still push forward with that half of this patch.

			regards, tom lane

[1] https://www.postgresql.org/message-id/3068812.1738206654@sss.pgh.pa.us



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Simplify executor's handling of CaseTestExpr & CoerceToDomainValue.

  2. Evaluate arguments of correlated SubPlans in the referencing ExprState