Re: Remove configure --disable-float4-byval and --disable-float8-byval - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Remove configure --disable-float4-byval and --disable-float8-byval
Date
Msg-id CA+TgmoahOo7-f+rP9UJEcFzyQxs6qQRadUwreaNtF31GJcZSOw@mail.gmail.com
Whole thread Raw
In response to Re: Remove configure --disable-float4-byval and--disable-float8-byval  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Sat, Nov 2, 2019 at 8:00 PM Andres Freund <andres@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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Next
From: Bruce Momjian
Date:
Subject: Re: ssl passphrase callback