diff options
author | Tom Lane | 2003-09-13 21:44:50 +0000 |
---|---|---|
committer | Tom Lane | 2003-09-13 21:44:50 +0000 |
commit | c472b8366f5bec1da4d5d5b894f47508bbc8d5d6 (patch) | |
tree | 26615ebe830975a50b1698dece1286e1adecaa52 /contrib/tablefunc/tablefunc.c | |
parent | 94a13b8a117c134a18ae37764c5524874b479db2 (diff) |
With Joe Conway's concurrence, remove srandom() call from normal_rand().
This was the last piece of code that took it upon itself to reset the
random number sequence --- now we only have srandom() in postmaster start,
backend start, and explicit setseed() operations.
Diffstat (limited to 'contrib/tablefunc/tablefunc.c')
-rw-r--r-- | contrib/tablefunc/tablefunc.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c index 312c63a4c0c..031d7c8bc8a 100644 --- a/contrib/tablefunc/tablefunc.c +++ b/contrib/tablefunc/tablefunc.c @@ -165,8 +165,8 @@ typedef struct crosstab_hashent * normal_rand - return requested number of random values * with a Gaussian (Normal) distribution. * - * inputs are int numvals, float8 lower_bound, and float8 upper_bound - * returns float8 + * inputs are int numvals, float8 mean, and float8 stddev + * returns setof float8 */ PG_FUNCTION_INFO_V1(normal_rand); Datum @@ -213,12 +213,6 @@ normal_rand(PG_FUNCTION_ARGS) funcctx->user_fctx = fctx; - /* - * we might actually get passed a negative number, but for this - * purpose it doesn't matter, just cast it as an unsigned value - */ - srandom(PG_GETARG_UINT32(3)); - MemoryContextSwitchTo(oldcontext); } |