On Sat, Nov 2, 2019 at 8:00 PM Andres Freund <and...@anarazel.de> wrote: > I think we really ought to remove the difference behind macros. That is, > for types that could be either, provide macros that fetch function > arguments into local memory, independent of whether the argument is a > byval or byref type. I.e. instead of having separate #ifdef > USE_FLOAT8_BYVALs for DatumGetFloat8(), DatumGetInt64(), ... we should > provide that logic in one centralized set of macros. > > The fact that USE_FLOAT8_BYVAL has to creep into various functions imo > is the reasons why people are unhappy about it.
I think I'm *more* unhappy about the fact that it affects a bunch of things that are not about whether float8 is passed byval. I mean, you mention DatumGetInt64() above, but why in the world does a setting with "float8" in the name affect how we pass int64? The thing is like kudzu, getting into all sorts of things that it has no business affecting - at least if you judge by the name - and for no really clear reason. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company