pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Paul Ramsey <pramsey@cleverelephant.ca>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PATCH] random_normal function
Date: Mon, 09 Jan 2023 10:26:23 -0500
Message-ID: <4093782.1673277983@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCXDi2VkMAJSJ5=VNopTVDFfThoyQmNBaPLQQKJ+t7xSzQ@mail.gmail.com>
References: <CACowWR0DqHAvOKUCNxTrASFkWsDLqKMd6WiXvVvaWg4pV1BMnQ@mail.gmail.com>
	<20221208224623.GQ27893@telsasoft.com>
	<F103485B-F7B3-40CF-A149-17BA70AF2B61@cleverelephant.ca>
	<20221231035804.GJ1153@telsasoft.com>
	<Y7OR5nh8qetbwgXX@paquier.xyz>
	<1682143.1672713508@sss.pgh.pa.us>
	<1776287.1672764097@sss.pgh.pa.us>
	<3983784.1673223640@sss.pgh.pa.us>
	<CAEZATCXDi2VkMAJSJ5=VNopTVDFfThoyQmNBaPLQQKJ+t7xSzQ@mail.gmail.com>

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





view thread (47+ messages)  latest in thread

Message-ID: <4093782.1673277983@sss.pgh.pa.us>
Permalink:  ../4093782.1673277983@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4093782.1673277983@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dean.a.rasheed@gmail.com, pramsey@cleverelephant.ca, coelho@cri.ensmp.fr, michael@paquier.xyz, pryzby@telsasoft.com
  Subject: Re: [PATCH] random_normal function
  In-Reply-To: <4093782.1673277983@sss.pgh.pa.us>
  References: <CACowWR0DqHAvOKUCNxTrASFkWsDLqKMd6WiXvVvaWg4pV1BMnQ@mail.gmail.com> <20221208224623.GQ27893@telsasoft.com> <F103485B-F7B3-40CF-A149-17BA70AF2B61@cleverelephant.ca> <20221231035804.GJ1153@telsasoft.com> <Y7OR5nh8qetbwgXX@paquier.xyz> <1682143.1672713508@sss.pgh.pa.us> <1776287.1672764097@sss.pgh.pa.us> <3983784.1673223640@sss.pgh.pa.us> <CAEZATCXDi2VkMAJSJ5=VNopTVDFfThoyQmNBaPLQQKJ+t7xSzQ@mail.gmail.com> <4093782.1673277983@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox