Andres Freund <and...@anarazel.de> writes: > On 2023-01-15 18:08:21 -0500, Tom Lane wrote: >> ri_newTupleSlot has the tupdesc we want, planSlot is a virtual slot >> that has the bogus tupdesc, and for some reason heap_form_tuple is >> getting called with planSlot's tupdesc not ri_newTupleSlot's.
> The way we copy a slot into a heap slot is to materialize the source slot and > copy the heap tuple into target slot. Which is also what happened before the > slot type abstraction (hence the problem also existing before that was > introduced). Hmm. For the case of virtual->physical slot, that doesn't sound terribly efficient. > I think it's fairly fundamental that copying between two slots assumes a > compatible tupdescs. We could possibly make some effort to inject the desired attstorage properties into the planSlot's tupdesc. Not sure where would be a good place. regards, tom lane