I'm struggling to understand one particular thing about Custom Scan API.
As you may know, there's a function called use_physical_tlist(), which aims
to eliminate meaningless projections during query execution. Any scan node
(e.g. CustomScan) aims to take advantage of physical targetlists... except
for the IndexOnlyScan (for obvious reasons):
if (use_physical_tlist(root, best_path, flags))
if (best_path->pathtype == T_IndexOnlyScan)
/* For index-only scan, the preferred tlist is the index's */
tlist = copyObject(((IndexPath *)
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
Is there any existing workaround?
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: