Re: pg_stop_backup() v2 incorrectly marked as proretset

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_stop_backup() v2 incorrectly marked as proretset
Дата
Msg-id 3441490.1646343642@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_stop_backup() v2 incorrectly marked as proretset  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: pg_stop_backup() v2 incorrectly marked as proretset  (Chapman Flack <chap@anastigmatix.net>)
Re: pg_stop_backup() v2 incorrectly marked as proretset  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Mar 2, 2022 at 9:35 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I've not read the whole patch, but this snippet seems fine to me
>> if there's also an #undef at the end of the function.

>> From later emails, it sounds like that's not the common practice in
> similar cases, and I don't personally see the point.

The point is to make it clear that the macro isn't intended to affect
code outside the function.  Since C lacks block-scoped macros,
there's no other way to do that.

I concede that a lot of our code is pretty sloppy about this, but
that doesn't make it a good practice.

            regards, tom lane



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

Предыдущее
От: Zhihong Yu
Дата:
Сообщение: Re: casting operand to proper type in BlockIdGetBlockNumber
Следующее
От: Tom Lane
Дата:
Сообщение: Re: casting operand to proper type in BlockIdGetBlockNumber