[Patch] Log10 and hyperbolic functions for SQL:2016 compliance - Mailing list pgsql-hackers

From Lætitia Avrot
Subject [Patch] Log10 and hyperbolic functions for SQL:2016 compliance
Date
Msg-id CAB_COdguG22LO=rnxDQ2DW1uzv8aQoUzyDQNJjrR4k00XSgm5w@mail.gmail.com
Whole thread Raw
Responses Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: House style for DocBook documentation?
Next
From: Adrien NAYRAT
Date:
Subject: Re: Log a sample of transactions