docs for random function

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: docs for random function
Date: 2009-08-16 12:35:03
Message-ID: 20090816123503.GX5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

The docs for the function random() currently say:

random value between 0.0 and 1.0, inclusive

this isn't a particularly useful invariant, what the code actually does
(and is commented as doing) is much more useful. Any chance of changing
it to something like:

--- doc/src/sgml/func.sgml~ 2009-06-17 22:58:49.000000000 +0100
+++ doc/src/sgml/func.sgml 2009-08-16 13:28:18.814767110 +0100
@@ -821,7 +821,7 @@
<row>
<entry><literal><function>random</function>()</literal></entry>
<entry><type>dp</type></entry>
- <entry>random value between 0.0 and 1.0, inclusive</entry>
+ <entry>random value in the range [0.0 - 1.0)</entry>
<entry><literal>random()</literal></entry>
<entry></entry>
</row>

or maybe something more readable to non-maths people?

--
Sam http://samason.me.uk/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pierre Frédéric Caillaud 2009-08-16 12:35:40 Re: [PATCH] plpythonu datatype conversion improvements
Previous Message Peter Eisentraut 2009-08-16 12:14:16 Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )