Andrey Lepikhov <a.lepik...@postgrespro.ru> writes: > But why the Index type still uses for indexing of range table entries? > For example: > - we give int resultRelation value to create_modifytable_path() as Index > nominalRelation value. > - exec_rt_fetch(Index) calls list_nth(int). > - generate_subquery_vars() accepts an 'Index varno' value
As I mentioned, the patch only intends to touch code that's possibly used with post-setrefs Vars. In the parser and most of the planner, there's little need to do anything because only positive varno values will appear. So touching that code would just make the patch more invasive without accomplishing much. If we'd had any strong convention about whether RT indexes should be int or Index, I might be worried about maintaining consistency. But it's always been a horrid mishmash of both ways. Cleaning that up completely is a task I don't care to undertake right now. regards, tom lane