Re: pg_stop_backup() v2 incorrectly marked as proretset

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: pg_stop_backup() v2 incorrectly marked as proretset
Дата
Msg-id 62213A77.3040508@anastigmatix.net
обсуждение исходный текст
Ответ на Re: pg_stop_backup() v2 incorrectly marked as proretset  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_stop_backup() v2 incorrectly marked as proretset  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 03/03/22 16:40, Tom Lane wrote:
> 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.

Would the

  Datum values[3];
  bool   nulls[ lengthof(values) ];

pattern be more notationally tidy? No macro to define or undefine,
we already define lengthof() in c.h, and it seems pretty much made
for the purpose, if the objective is to have just one 3 to change
if it someday becomes not-3.

Regards,
-Chap



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: casting operand to proper type in BlockIdGetBlockNumber
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_stop_backup() v2 incorrectly marked as proretset