Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance
Дата
Msg-id 23824.1548517319@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [Patch] Log10 and hyperbolic functions for SQL:2016 compliance  (Lætitia Avrot <laetitia.avrot@gmail.com>)
Ответы Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance  (Lætitia Avrot <laetitia.avrot@gmail.com>)
Список pgsql-hackers
=?UTF-8?Q?L=C3=A6titia_Avrot?= <laetitia.avrot@gmail.com> writes:
> [ adding_log10_and_hyperbolic_functions_v1.patch ]

No objection to the feature, but 

- Why are you using the float4-width library functions (coshf etc)
rather than the float8-width ones (cosh etc)?

- I wonder whether these library functions exist everywhere.
If they don't, what will we do about it ... throw an error?

I see that SUSv2 requires cosh() and so on, so it's quite possible
that these do exist everywhere we care about.  I'd be okay with
throwing a patch onto the buildfarm to see, and adding an autoconf
test only if the buildfarm is unhappy.  But we should be clear on
what we're going to do about it if that happens.

> I added regression tests for the new functions, but I didn't for log10
> function, assuming that if log function worked, log10 will work too.

Not quite sure I believe that.

Actually, what I'd counsel is that you *not* include tests of what
these do with Inf and NaN.  There is no upside to doing so, and lots
of downside if older platforms are squirrely in their behavior, which
is hardly unlikely (cf opossum ...)

            regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jim Finnerty
Дата:
Сообщение: Re: Use zero for nullness estimates of system attributes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Use zero for nullness estimates of system attributes