Re: pgsql: Remove unreachable code in expression evaluation.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Remove unreachable code in expression evaluation.
Дата
Msg-id 24361.1490501670@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql: Remove unreachable code in expression evaluation.  (Andres Freund <andres@anarazel.de>)
Ответы Re: pgsql: Remove unreachable code in expressionevaluation.  (Andres Freund <andres@anarazel.de>)
Список pgsql-committers
Andres Freund <andres@anarazel.de> writes:
> Remove unreachable code in expression evaluation.
> The previous code still contained expression evaluation time support
> for CaseExprs without a defresult.  But transformCaseExpr() creates a
> default expression if necessary.

BTW, now that I think about it, I wonder if a better answer wouldn't
be to leave the execExpr code as it stood, and remove the code in
transformCaseExpr that pre-creates a default expression.  You'd end
up with identical code at runtime, and eliminate some parse/rewrite/plan
overhead for dealing with that subexpression.

It's possible there's some code somewhere else that expects defresult
to always be non-null, but I can't think what, or why that would be
a good thing to assume.

            regards, tom lane


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Blindly attempt to fix sepgsql tests #2.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Remove unreachable code in expressionevaluation.