Re: Remove configure --disable-float4-byval and --disable-float8-byval

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Remove configure --disable-float4-byval and --disable-float8-byval
Дата
Msg-id CA+TgmoahOo7-f+rP9UJEcFzyQxs6qQRadUwreaNtF31GJcZSOw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Remove configure --disable-float4-byval and--disable-float8-byval  (Andres Freund <andres@anarazel.de>)
Список 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 по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: ssl passphrase callback