Tom Lane wrote:
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.
True, but as you can see, create_append_plan() produces its own targetlist:
static Plan *
create_append_plan(PlannerInfo *root, AppendPath *best_path)
List *tlist = build_path_tlist(root, &best_path->path);
If we replace Append with some custom node, the plan will instantly become
invalid (it won't be be able to build a projection from 'custom_scan_tlist'
to 'targetlist'). However, this doesn't mean that it's unable to produce
the same result.
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: