Hello Ildar,

Sorry for a long delay. I've added hash() function which is just an
alias for murmur2. I've also utilized variable arguments feature from
least()/greates() functions to make optional seed parameter, but I
consider this as a hack.

Patch needs a rebase after Teodor push for a set of pgbench functions.

Should we probably add some infrastructure for optional arguments?

You can look at the handling of "CASE" which may or may not have an "ELSE" clause.

I'd suggest you use a new negative argument with the special meaning for hash, and create the seed value when missing when building the function, so as to simplify the executor code.

Instead of 0, I'd consider providing a random default so that the hashing behavior is not the same from one run to the next. What do you think?

Like the previous version, murmur2 with seed looks much more random than fnv with seed...

--
Fabien.

Reply via email to