Re: [HACKERS] Planner drops unreferenced tables --- bug, no?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Planner drops unreferenced tables --- bug, no?
Дата
Msg-id 3863.938617492@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Planner drops unreferenced tables --- bug, no?  (wieck@debis.com (Jan Wieck))
Ответы Re: [HACKERS] Planner drops unreferenced tables --- bug, no?  (wieck@debis.com (Jan Wieck))
Список pgsql-hackers
wieck@debis.com (Jan Wieck) writes:
>> It seems to me that the latter query must yield 9 rows (three
>> occurrences of each value) to satisfy the SQL spec.  The spec defines
>> the result of a two-query FROM clause to be the Cartesian product of the
>> two tables, period.  It doesn't say anything about "only if one or more
>> columns of each table are actually used somewhere".

>     Caution here!

>     After  rewriting  there can be many unused rangetable entries
>     floating around. Especially if you SELECT from  a  view,  the
>     view's relation is still mentioned in the rangetable.

I was thinking of forcing rangetable entries that are marked as
'inFromCl' to be included in the planner's target relation set,
but those not so marked would only get added if referenced, same as now.
Do you think that will not work?

            regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: wieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] Planner drops unreferenced tables --- bug, no?
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: New notices?