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

From: Lætitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance
Date: 2019-01-26 09:50:15
Message-ID: CAB_COdguG22LO=rnxDQ2DW1uzv8aQoUzyDQNJjrR4k00XSgm5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.*

Attachment Content-Type Size
adding_log10_and_hyperbolic_functions_v1.patch text/x-patch 7.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Adrien NAYRAT 2019-01-26 10:44:58 Re: Log a sample of transactions
Previous Message Peter Eisentraut 2019-01-26 08:31:13 Re: House style for DocBook documentation?