Re: pgsql: Add pow(), aka power(), function to pgbench.

From: Raúl Marín Rodríguez <rmrodriguez(at)carto(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Add pow(), aka power(), function to pgbench.
Date: 2017-12-29 13:04:45
Message-ID: CAM6_UM4N1O_=gOpoM7Jw=MDzKZGu5mbLdg5=r-mB9z7efjFjSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2017-12-29 13:43:48 pgsql: Allow leading zero on exponents in pgbench test results
Previous Message Fabien COELHO 2017-12-29 11:57:39 Re: pgsql: Add pow(), aka power(), function to pgbench.