Re: [PATCH] random_normal function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] random_normal function
Date
Msg-id 4093782.1673277983@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] random_normal function  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: [PATCH] random_normal function
List pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> So IMO all pseudorandom functions should share the same PRNG state and
> seed-setting functions. That would mean they should all be in the same
> (new) C file, so that the PRNG state can be kept private to that file.

I agree with this in principle, but I feel no need to actually reshuffle
the code before we accept a proposal for such a function that wouldn't
logically belong in float.c.

> I think it would also make sense to add a new "Random Functions"
> section to the docs, and move the descriptions of random(),
> random_normal() and setseed() there.

Likewise, this'll just add confusion in the short run.  A <sect1>
with only three functions in it is going to look mighty odd.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Jelte Fennema
Date:
Subject: Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert
Next
From: Jim Jones
Date:
Subject: Re: [PATCH] psql: Add tab-complete for optional view parameters