From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Raúl Marín Rodríguez <rmrodriguez@carto.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Add pow(), aka power(), function to pgbench.
Date: Fri, 29 Dec 2017 08:51:10 -0500
Message-ID: <6a65f141-d1e2-d30b-397a-57fffedd2965@2ndQuadrant.com> (raw)
In-Reply-To: <CAM6_UM4N1O_=gOpoM7Jw=MDzKZGu5mbLdg5=r-mB9z7efjFjSw@mail.gmail.com>
References: <E1eUGjI-0000le-LP@gemulon.postgresql.org>
<CAEepm=05eHoN6XL1JCGwd7Kr5+By3hSMgFSqT=Jzqm522=pcxQ@mail.gmail.com>
<alpine.DEB.2.20.1712291255350.14239@lancre>
<CAM6_UM4N1O_=gOpoM7Jw=MDzKZGu5mbLdg5=r-mB9z7efjFjSw@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andrew.dunstan@2ndquadrant.com, rmrodriguez@carto.com, coelho@cri.ensmp.fr, thomas.munro@enterprisedb.com, rhaas@postgresql.org
Subject: Re: pgsql: Add pow(), aka power(), function to pgbench.
In-Reply-To: <6a65f141-d1e2-d30b-397a-57fffedd2965@2ndQuadrant.com>
References: <E1eUGjI-0000le-LP@gemulon.postgresql.org> <CAEepm=05eHoN6XL1JCGwd7Kr5+By3hSMgFSqT=Jzqm522=pcxQ@mail.gmail.com> <alpine.DEB.2.20.1712291255350.14239@lancre> <CAM6_UM4N1O_=gOpoM7Jw=MDzKZGu5mbLdg5=r-mB9z7efjFjSw@mail.gmail.com> <6a65f141-d1e2-d30b-397a-57fffedd2965@2ndQuadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox