Re: [HACKERS] pow support for pgbench - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] pow support for pgbench
Date
Msg-id alpine.DEB.2.20.1712270840070.22976@lancre
Whole thread Raw
In response to Re: [HACKERS] pow support for pgbench  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Bonjour Michaël,

> And my 2c on the matter is that switching silently from one version to
> the other would be unwelcome. The user should be aware if a test is
> overflowing a number when specifying an integer.

This whole integer pow version is becoming unduly complicated and ugly.

For me, the rational of having the ipow implementation was to have a 
precise integer result when possible. Now that it is casted to double and 
the precision is lost, the whole point of ipow is moot, even if there is 
some performance gain.

So given that committers do not want the int/double version because it is 
slightly different from the numeric/double version of SQL (obviously), and 
that the integer version is becoming over complicated with checks and 
warnings or errors, I'm now in favor of just dropping it, and provide the 
double version only.

Too bad for integer computations on keys which is the core of pgbench use 
case, but I can't help it.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Feike Steenbergen
Date:
Subject: Re: Add hint about replication slots when nearing wraparound
Next
From: "Michelle Konzack"
Date:
Subject: Re: [table partitioning] How many partitions are possibel?