Michael Paquier <mich...@paquier.xyz> writes: > Another comment that can apply to all the patches presented on this > thread. Could it be worth splitting these inline functions into a > separate header that declares varatt.h, meaning that we'd need to > think a bit more about the structures themselves and all the > sub-macros like SET_VARSIZE_1B() & friends?
IIRC we already moved these macros out of postgres.h, some years ago. I don't really see how we could hide the lower-level macros from callers' eyes while still having them available to inline functions. The point of this exercise IMO is not information hiding: it is to be clearer about the input and output datatypes of the functions, and to eliminate multiple-evaluation hazards. regards, tom lane