Michael Paquier <michael(at)paquier(dot)xyz> writes:
> Just for an assert, I would just remove the macro rather than have an
> inline function.
Oh, I'd not noticed that there is only one caller.
However, the macro does provide a convenient place to hang the
warning comment about keeping it sync'd with the enum.
Personally I'd keep the macro but move it to pgstat.h, close
to the enum declaration, so that there's more than epsilon
chance of someone who's changing the enum noticing they need
to update it.
regards, tom lane