Re: Increase value of OUTER_VAR - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Increase value of OUTER_VAR
Date
Msg-id 99323.1631382126@sss.pgh.pa.us
Whole thread Raw
In response to Re: Increase value of OUTER_VAR  (Andrey Lepikhov <a.lepikhov@postgrespro.ru>)
List pgsql-hackers
Andrey Lepikhov <a.lepikhov@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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Increase value of OUTER_VAR
Next
From: Jaime Casanova
Date:
Subject: new regexp_*(text, text, int) functions crash