Re: General purpose hashing func in pgbench

Teodor Sigaev <teodor@sigaev.ru>

From: Teodor Sigaev <teodor@sigaev.ru>
To: Ildar Musin <i.musin@postgrespro.ru>, pgsql-hackers@lists.postgresql.org
Date: 2018-03-21T15:02:00Z
Lists: pgsql-hackers
> I finally managed to perform this test on sparc v9 machine which is 64
> bit big-endian architecture. I run pgbench script (see previous message)
> with default_seed=123 on both x86-64 and sparc machines and visualized
> the results. You can find them in the attached chart. Both images showed
> the same distribution. So endianness isn't a concern here.

Agree, pushed.

But I have a notice about number of arguments. Seems, special values for hash 
and greatest/least functions is not actually needed. If we split nargs option to 
n mandatory arguments and n optional ones then special values for that functions 
will go away: hash will have 1 mandatory and 1 optional, greatest/least will 
have one mandatory and infinite number of optional. Not sure for now about 
CASE/WHEN case. But seems it's a deal for separate refactoring.


-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/


Commits

  1. Add general purpose hasing functions to pgbench.