Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> Detoasting on first usage, ie. exec_eval_datum(), seems the best to me.
> Compared to detoasting on assignment, it avoids the performance
> regression if the value is never used, and I don't think checking if the
> value is toasted at every exec_eval_datum() call adds too much overhead.
The arguments that were made against this were about maintenance costs
and code footprint. Claims about performance are not really relevant,
especially when they're entirely unsupported by evidence.
regards, tom lane