Re: Reusing return value from planner_rt_fetch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Reusing return value from planner_rt_fetch
Дата
Msg-id 1054256.1667267269@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Reusing return value from planner_rt_fetch  (Zhihong Yu <zyu@yugabyte.com>)
Список pgsql-hackers
Zhihong Yu <zyu@yugabyte.com> writes:
> I was reading examine_variable in src/backend/utils/adt/selfuncs.c
> It seems we already have the rte coming out of the loop which starts on
> line 5181.
> Here is a patch which reuses the return value from `planner_rt_fetch`.

planner_rt_fetch is not so expensive that we should contort the code
to avoid one call.  So I'm not sure this is an improvement.  It
doesn't seem to be more readable, and it adds assumptions on
whether appinfo is initially null or becomes so later.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: heapgettup refactoring
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?