(2014/03/02 22:32), Fabien COELHO wrote:
Alvaro Herrera <alvhe...@2ndquadrant.com> writes:
Seems that in the review so far, Fabien has focused mainly in the
mathematical properties of the new random number generation.  That seems
perfectly fine, but no comment has been made about the chosen UI for the
feature.
 Per the few initial messages in the thread, in the patch as submitted you ask
for a gaussian random number by using \setgaussian, and exponential via
\setexp.  Is this the right UI?
I thought it would be both concise & clear to have that as another form of 
\set*.
Yeah, but we got only two or three? concise. So I agree with discussing about 
UI.

There is an additional argument expected. That would make:

   \setrandom foo 1 10 [uniform]
   \setrandom foo 1 :size gaussian 3.6
   \setrandom foo 1 100 exponential 7.2
It's good design. I think it will become more low overhead at part of parsing in pgbench, because comparison of strings will be redeced(maybe). And I'd like to remove [uniform], beacause we have to have compatibility for old scripts, and random function always gets uniform distribution in common sense of programming.

However, new grammer is little bit long in user script. It seems trade-off that are visibility of scripts and user writing cost.

Regards,
--
Mitsumasa KONDO
NTT Open Source Software Center


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to