Robert Haas <robertmh...@gmail.com> writes: > On Wed, Mar 2, 2022 at 9:35 AM Tom Lane <t...@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