Hello David,

At the moment I feel the patch is a bit half done. I really think that
since the gaussian and exponential stuff was added in commit ed802e7d, that
this should now be changed so that we have functions like random(),
erandom() and grandom() and the way to use this becomes:

\set name random(1,10)
\set name erandom(1,10)

And we completely pull out the new \\setrandom additions added in that
commit. We'd likely keep \\setrandom name 1 10 for backwards compatibility.

Does anyone else feel strongly about fixing this now, while we have the
chance?

I thought about adding functions, possibly random, very probably abs & some hash, but I felt it would be more for a second round.

The other point is that although uniform random is fine, the gaussian and exponential ones require an additional floating point argument which means handling some typing.

The current patch is "just" about handling operators as before, although in a much nicer and extensible way, thus I would suggest to let Robert's patch more or less as it is, and people will be able to propose new extensions later on.

--
Fabien.


--
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