did initial testing and review ,the patches LGTM except indentation we can solve this by running pg_indent.
i have one doubt that why we are using compute_virtual argument todo the same work in both cases, is it because of future proofing ,like we may do something different for stored and virtual in future?
/* No luck, so prepare the expression for execution */ if (attgenerated == ATTRIBUTE_GENERATED_STORED) { ri_GeneratedExprs[i] = ExecPrepareExpr(expr, estate); ri_NumGeneratedNeeded++; } else if (compute_virtual) { ri_GeneratedExprs[i] = ExecPrepareExpr(expr, estate); ri_NumGeneratedNeeded++; }