Re: [HACKERS] pow support for pgbench
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Raúl Marín Rodríguez <rmrodriguez@carto.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
Michael Paquier <michael.paquier@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>,
PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-12-21T21:48:27Z
Lists: pgsql-hackers
Hello Raúl, >> v7 needs a rebase. >> >> Also, you might try to produce a version which is compatible with Robert's >> constraints. My 0.02€ on this new version: Applies cleanly, compiles and works. I cannot say that I like it more than the previous version. If a double is always returned, I'm wondering whether keeping the ipow version makes much sense: In case of double loss of precision, the precision is lost, too bad, and casting back to int won't bring it back. In the doc, I'm not sure that "Numeric" brings anything. "Exponentiation" would be enough. Also, in pg I just noticed that POW is a shorthand for POWER. Maybe both should be supported? Or not. -- Fabien.
Commits
-
Add pow(), aka power(), function to pgbench.
- 7a727c180aa3 11.0 landed
-
pgbench: Support double constants and functions.
- 86c43f4e22c0 9.6.0 cited