Re: pg_stop_backup() v2 incorrectly marked as proretset - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_stop_backup() v2 incorrectly marked as proretset
Date
Msg-id 2976202.1646231744@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_stop_backup() v2 incorrectly marked as proretset  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_stop_backup() v2 incorrectly marked as proretset  (Aleksander Alekseev <aleksander@timescale.com>)
Re: pg_stop_backup() v2 incorrectly marked as proretset  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Mar 2, 2022 at 5:25 AM Aleksander Alekseev
> <aleksander@timescale.com> wrote:
>> Declaring a macro inside the procedure body is a bit unconventional.
>> Since it doesn't seem to be used for anything except these two array
>> declarations I suggest keeping simply "3" here.

> I think we do this kind of thing in various places in similar
> situations, and I think it is good style. It makes it easier to catch
> everything if you ever need to update the code.

Yeah, there's plenty of precedent for that coding if you look around.
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.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pg_stop_backup() v2 incorrectly marked as proretset
Next
From: Aleksander Alekseev
Date:
Subject: Re: pg_stop_backup() v2 incorrectly marked as proretset