Here is a v12 which implements the suggestions below.
> Should we not allow for functions taking 0 arguments? Since we're already
> into some math here, how about pi()? ;-)
Hmmm, why not.
> I understand requiring at least 1 arg simplifies the code a bit, but right
> now it reports syntax error for "random()", while it correctly reports
> unexpected number of arguments for "random(1,2,3)". We would need another
> check for min() and max() which expect >=1 arguments, but it's easy to add.
Indeed, I had to add a special check.
> I would also argue that we should rename "random" to "rand" here to avoid
> confusion with the familiar SQL function "random()" that doesn't take
> arguments.
Why not, as it is also consistent with exporand() & gaussrand().
--
Fabien.