Re: Adding CORRESPONDING to Set Operations
От | Tom Lane |
---|---|
Тема | Re: Adding CORRESPONDING to Set Operations |
Дата | |
Msg-id | 1957.1316969431@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Adding CORRESPONDING to Set Operations (Kerem Kat <keremkat@gmail.com>) |
Ответы |
Re: Adding CORRESPONDING to Set Operations
|
Список | pgsql-hackers |
Kerem Kat <keremkat@gmail.com> writes: > On Sat, Sep 24, 2011 at 19:51, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Why? CORRESPONDING at a given set-operation level doesn't affect either >> sub-query, so I don't see why you'd need a different representation for >> the sub-queries. > In the planner to construct a subquery out of SetOperationStmt or > RangeTblRef, a new RangeTblRef is needed. > To create a RangeTableRef, parser state is needed and planner assumes > root->parse->rtable be not modified > after generating simple_rte_array. Actually, after looking at the code again, I don't think you need any of that, since there's already a SubqueryScan node being inserted into the plan. You just need to improve generate_setop_tlist so that it can deal with cases where the mapping from subplan targetlist to the setop output columns isn't one-to-one. regards, tom lane
В списке pgsql-hackers по дате отправления: