Re: pgsql: Add pow(), aka power(), function to pgbench. - Mailing list pgsql-committers

From Raúl Marín Rodríguez
Subject Re: pgsql: Add pow(), aka power(), function to pgbench.
Date
Msg-id CAM6_UM4N1O_=gOpoM7Jw=MDzKZGu5mbLdg5=r-mB9z7efjFjSw@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add pow(), aka power(), function to pgbench.  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: pgsql: Add pow(), aka power(), function to pgbench.  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-committers
Probably "0?". Although an int with leading zeros is usually an octal number, so window's rational fails me.

You are right. From the C99 standard:
The exponent always contains at least two digits, and only as many more digits as necessary to represent the exponent. If the value is zero, the exponent is zero.

 Both solutions seem fine to me. Also, as these couple of tests were added to check for int overflow and we no longer do any int operations, removing them wouldn't be a big loss. 
--
Raúl Marín Rodríguez 
carto.com

pgsql-committers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgsql: Add pow(), aka power(), function to pgbench.
Next
From: Andrew Dunstan
Date:
Subject: pgsql: Allow leading zero on exponents in pgbench test results