On 2019/03/27 12:06, Amit Langote wrote:
> I wonder if I should rework inherit.c so that its internal interfaces
> don't pass around parent Relation, but make do with the RelOptInfo?  I'll
> need to add tupdesc and reltype fields to RelOptInfo to go ahead with that
> though.

To give more context on the last sentence, the only place we need the
TupleDesc for is make_inh_translation_list().  Maybe, instead of adding
tupdesc to RelOptInfo, we could add a List of Vars of all attributes of a
table.  To avoid the overhead of always setting it, maybe we could set it
only for inheritance parent tables.  Adding tupdesc to RelOptInfo might be
a hard sell to begin with, because it would need to be pinned and then
released at the end of planning.

I'll see if I can make this work.

Thanks,
Amit



Reply via email to