[Patch] Log10 and hyperbolic functions for SQL:2016 compliance
Lætitia Avrot <laetitia.avrot@gmail.com>
From: Lætitia Avrot <laetitia.avrot@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-01-26T09:50:15Z
Lists: pgsql-hackers
Attachments
- adding_log10_and_hyperbolic_functions_v1.patch (text/x-patch) patch v1
Hello hackers,
In his blog post (What's new in SQL 2016)[
https://modern-sql.com/blog/2017-06/whats-new-in-sql-2016], Markus Winand
explained some of the changes added to SQL:2016. I spotted that Postgres
was behind other RDBMS on hyperbolic functions and log10 function.
The log10 function existed but under the name log(<value>).
The new functions can be called in a simple select statement :
select log10(100);
select sinh(0);
select cosh(0);
select tanh(0);
Even if Markus Winand had added hyperbolic functions in the paragraph
"Trigonometric and Logarithmic Functions", I didn't add hyperbolic function
with the trigonometric functions in the documentation, because hyperbolic
functions are not trigonometric functions.
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.
You'll find enclosed the first version of the patch that can build
successfully on my laptop against master. I'm open to any improvement.
Cheers,
Lætitia
--
*Think! Do you really need to print this email ? *
*There is no Planet B.*
Commits
-
Add support for hyperbolic functions, as well as log10().
- f1d85aa98ee7 12.0 landed