| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | Matemática A3K <matematica(dot)a3k(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
| Subject: | [Minor] Improvement on random functions doc |
| Date: | 2026-10-21 02:06:12 |
| Message-ID: | CAKFQuwaM3+tCmTsvDd1C2QpFeVo2hKEY_MQfmEfX_LK7E13LSw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
On Tuesday, October 20, 2026, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Wed, Oct 21, 2026 at 3:54 AM Matemática A3K <matematica(dot)a3k(at)gmail(dot)com>
> wrote:
> > In my terms, this would be something like "Accuracy was traded in
> > order to better convey the idea to the audience". I find this to be
> > valid although I don't share it nor I think the documentation is built
> > upon it, but this is just my opinion, thanks for sharing yours.
>
> pgbench docs already describes random() as producing a
> "uniformly-distributed
> random integer". So I'm OK with explicitly stating that the distribution is
> uniform here as well.
>
> If we do that, I think it's better to use similar wording to keep the docs
> consistent.
>
I’m not strongly opposed to clarifying this but…
pgbench also has random_exponential and random_zipfian and calls
random_normal random_gaussian. Its target audience is quite different than
the person executing random in some SQL command. The fact that
normal_uniform doesn’t actually exist because an unqualified random is
conventionally drawn without any bias to a particular value.
The clarification in pgbench seems more like pattern matching with its
larger set of random variants.
I’m less inclined to use pgbench’s phrasing for much the same reason - the
returns wording seems to fit better in chapter 9. I’m also not a fan of
using “uniformly” if we do clarify this. “…from a uniform distribution
covering 0 <= x < 1” would pattern match the existing random_normal wording.
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matemática A3K | 2026-10-21 14:09:03 | Re: [Minor] Improvement on random functions doc |
| Previous Message | Fujii Masao | 2026-10-21 00:29:08 | Re: [Minor] Improvement on random functions doc |