Re: Don't codegen deform code for virtual tuples in expr eval for scan fetch

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Soumyadeep Chakraborty <soumyadeep2007@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2019-09-30T08:00:20Z
Lists: pgsql-hackers
Hi,

On 2019-09-27 23:01:05 -0700, Soumyadeep Chakraborty wrote:
> I completely agree, that was an important consideration.
> 
> I had some purely cosmetic suggestions:
> 1. Rename ExecComputeSlotInfo to eliminate the need for the asserts.

How does renaming it do so? I feel like the asserts are a good idea
independent of anything else?


> 2. Extract return value to a bool variable for slightly better
> readability.

To me that seems clearly worse. The variable doesn't add anything, but
needing to track more state.


> 3. Taking the opportunity to use TTS_IS_VIRTUAL.

Good point.

- Andres



Commits

  1. Don't generate EEOP_*_FETCHSOME operations for slots know to be virtual.

  2. Reduce code duplication for ExecJust*Var operations.