|From:||Ildar Musin <i(dot)musin(at)postgrespro(dot)ru>|
|To:||Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>|
|Subject:||Re: General purpose hashing func in pgbench|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
10/01/2018 21:42, Fabien COELHO пишет:
> Hmm. I do not think that we should want a shared seed value. The seed
> should be different for each call so as to avoid undesired
> correlations. If wanted, correlation could be obtained by using an
> explicit identical seed.
> ISTM that the best way to add the seed is to call random() when the
> second arg is missing in make_func. Also, this means that the executor
> would always get its two arguments, so it would simplify the code there.
Ok, I think I understand what you meant. You meant the case like following:
\set x random(1, 100)
\set h1 hash(:x)
\set h2 hash(:x) -- will have different seed from h1
so that different instances of hash function within one script would
have different seeds. Yes, that is a good idea, I can do that.
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
|Next Message||Alvaro Herrera||2018-01-11 16:23:55||Re: numeric regression test passes, but why?|
|Previous Message||Sergei Kornilov||2018-01-11 16:19:41||Re: Identifying ALTER TABLE "sub-command"|