Dmitry Ivanov <d.ivanov@postgrespro.ru> writes:
> In theory, CustomScans should be able to use any Plan nodes (i.e.
> 'custom_plans' list), but as far as I can understand, there's no way to
> override behavior of use_physical_tlist(), which means that we might see
> something like this:
> ERROR: variable not found in subplan target list
> if we use child IndexOnlyScan and the index does not include some of the
> relation's columns.
Uh, why would you see that? The planner would never generate an
IndexOnlyScan in the first place if the query required any columns
not available from the index.
regards, tom lane