Re: Small xlog.c cleanup

Поиск
Список
Период
Сортировка
От The Hermit Hacker
Тема Re: Small xlog.c cleanup
Дата
Msg-id Pine.BSF.4.33.0102271509340.354-100000@mobile.hub.org
обсуждение исходный текст
Ответ на Re: Small xlog.c cleanup  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Small xlog.c cleanup  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
On Tue, 27 Feb 2001, Tom Lane wrote:

> The Hermit Hacker <scrappy@hub.org> writes:
> > He's moved the "static globals" from around line 286 of
> > src/backend/access/transam/xlog.c:
> > to be static locals inside of function ReadRecord around line 1216 in the
> > same file:
>
> This is not usual coding practice in Postgres, so far as I've noticed.
>
> I prefer to avoid static locals because the fact that they *are* static
> is easily missed.  In particular it's way too easy to misread the
> initialization as something that happens on every entry to the function,
> rather than only once.  So my opinion is that this change is bad style.

Oops, don't take my response to Bruce as validation, only explanation of
what he was accomplishing, which Bruce appeared to indicate he didn't
understand ...



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Small xlog.c cleanup
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Small xlog.c cleanup