Hello all,
22/03/2018 19:31, Fabien COELHO пишет:
>>>
>>> Looks to me like the constants need to be written with INT64CONST().
>>> Also, the fact that the added regression test is passing makes me
>>> wonder whether it's actually exercising these functions meaningfully.
>
> I think that there is at least some coverage
> (https://coverage.postgresql.org/src/bin/pgbench/pgbench.c.gcov.html)
> and the function results are also checked for some values in the perl
> script output.
>
As Fabien said output values for some particular inputs are checked in
tests. The fact that test passed apparently shows that compiler is smart
enough to recognize those constants as 'long long' and use them
accordingly in expressions.
--
Ildar Musin
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company