Re: BUG #15820: Commuting two column make a SubqueryScan node to appear in the plan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15820: Commuting two column make a SubqueryScan node to appear in the plan
Дата
Msg-id 65155.1558962574@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #15820: Commuting two column make a SubqueryScan node to appear in the plan  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
>    switching the order of two columns make a SubqueryScan node to appear in
> the plan. It seems completely trivial as the cost is not modified, should it
> also be removed in the second case?

No.  The SubqueryScan can only be optimized away if it makes no changes
in the result tuple.

Conceivably, with sufficiently complicated hacking in setrefs.c,
simple cases like column reordering could be handled there.  But
I'm doubtful that it's worth the added cycles & risk of bugs.

            regards, tom lane



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15820: Commuting two column make a SubqueryScan node to appear in the plan
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15821: Parallel Workers with functions and auto_explain: ERROR: could not find key 3 in shm TOC