Eval expression R/O once time (src/backend/executor/execExpr.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Eval expression R/O once time (src/backend/executor/execExpr.c)
Дата
Msg-id CAEudQAqXuhbkaAp-sGH6dR6Nsq7v28_0TPexHOm6FiDYqwQD-w@mail.gmail.com
обсуждение исходный текст
Ответы Re: Eval expression R/O once time (src/backend/executor/execExpr.c)  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi,

Currently when determining where CoerceToDomainValue can be read,
it evaluates every step in a loop.
But, I think that the expression is immutable and should be solved only once.

Otherwise the logic is wrong since by the rules of C, even though the variable is
being initialized in the declaration, it still receives initialization at each repetition.
What causes palloc running multiple times.

In other words:
Datum   *domainval = NULL;

is the same:
Datum   *domainval;
domainval = NULL;

Once there, reduce the scope for save_innermost_domainval and save_innermost_domainnull.

Thoughts?

regards,
Ranier Vilela
Вложения

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

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: Added schema level support for publication.
Следующее
От: Andres Freund
Дата:
Сообщение: windows build slow due to windows.h includes