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

From Andrew Dunstan
Subject Re: pgsql: Add pow(), aka power(), function to pgbench.
Date
Msg-id 6a65f141-d1e2-d30b-397a-57fffedd2965@2ndQuadrant.com
Whole thread Raw
In response to Re: pgsql: Add pow(), aka power(), function to pgbench.  (Raúl Marín Rodríguez <rmrodriguez@carto.com>)
List pgsql-committers

On 12/29/2017 08:04 AM, Raúl Marín Rodríguez wrote:
>
>     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 <http://carto.com/>
>


0? seems right. I have committed that.

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Allow leading zero on exponents in pgbench test results
Next
From: Simon Riggs
Date:
Subject: pgsql: Extend near-wraparound hints to include replication slots