Re: docs for random function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: docs for random function
Date: 2009-08-16 19:57:23
Message-ID: 5064.1250452643@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sam Mason <sam(at)samason(dot)me(dot)uk> writes:
> 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:

Yeah, it looks like Bruce changed this back in 8.2 and failed to fix
the documentation to match. I used this wording instead:

***************
*** 821,827 ****
<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><literal>random()</literal></entry>
<entry></entry>
</row>
--- 821,827 ----
<row>
<entry><literal><function>random</function>()</literal></entry>
<entry><type>dp</type></entry>
! <entry>random value in the range 0.0 &lt;= x &lt; 1.0</entry>
<entry><literal>random()</literal></entry>
<entry></entry>
</row>

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Krešimir Jozić 2009-08-16 20:05:54 Croatian translation
Previous Message Jan Otto 2009-08-16 19:41:07 Re: drop tablespace error: invalid argument