Re: Convert varatt.h macros to static inline functions
От | Tom Lane |
---|---|
Тема | Re: Convert varatt.h macros to static inline functions |
Дата | |
Msg-id | 2199599.1754024853@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Convert varatt.h macros to static inline functions (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: Convert varatt.h macros to static inline functions
|
Список | pgsql-hackers |
Michael Paquier <michael@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
В списке pgsql-hackers по дате отправления: