Re: Define variables in the approprieate scope

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Define variables in the approprieate scope
Дата
Msg-id 20200324010424.GA1836@paquier.xyz
обсуждение исходный текст
Ответ на Re: Define variables in the approprieate scope  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Define variables in the approprieate scope  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Mar 23, 2020 at 08:50:55PM -0400, Bruce Momjian wrote:
> On Mon, Mar 23, 2020 at 01:00:24PM -0300, Alvaro Herrera wrote:
>> If we're talking about personal preference, my own is what Antonin
>> shows.  However, since disagreement has been expressed, I think we
>> should only change it if the generated code turns out better.
>
> I am fine with either usage, frankly.  I was just pointing out what
> might be the benefit of the current coding.

Personal opinion here.  I tend to prefer putting variable declarations
into the inner portions because it makes it easier to reason about the
code, though I agree that this concept does not need to be applied all
the time.
--
Michael

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Define variables in the approprieate scope
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Additional improvements to extended statistics