Re: Define variables in the approprieate scope

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Define variables in the approprieate scope
Дата
Msg-id 20200318230847.GC28341@momjian.us
обсуждение исходный текст
Ответ на Define variables in the approprieate scope  (Antonin Houska <ah@cybertec.at>)
Ответы Re: Define variables in the approprieate scope  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Tue, Feb 25, 2020 at 09:35:52AM +0100, Antonin Houska wrote:
> I've noticed that two variables in RelationCopyStorage() are defined in a
> scope higher than necessary. Please see the patch.

It seems cleaner to me to allocate the variables once before the loop
starts, rather than for each loop iteration.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Make MemoryContextMemAllocated() more precise
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgsql: Disk-based Hash Aggregation.