setseed() doc - Mailing list pgsql-patches

From Dennis Bjorklund
Subject setseed() doc
Date
Msg-id 44FC70C3.6020801@zigo.dhs.org
Whole thread Raw
Responses Re: setseed() doc
List pgsql-patches
The doc doesn't state in what range the argument to setseed() should be.

Some tests suggest that only values in the range -1.0 to 1.0 work as a
seed and values outside of that give the same sequence of random numbers.

I've attached a trivial one line patch (this is the patch list after
all), but feel free to document it in any way that is appropriate.

setseed() also return an integer, but I have no clue of what it is. The
doc doesn't say anything about it.

The doc say that some functions here depend on the libc that is used,
but such things as the range of the argument and what the return value
is should be in the doc, shouldn't it?

/Dennis
Index: doc/src/sgml/func.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v
retrieving revision 1.332
diff -u -r1.332 func.sgml
--- doc/src/sgml/func.sgml    22 Aug 2006 00:49:19 -0000    1.332
+++ doc/src/sgml/func.sgml    4 Sep 2006 18:18:26 -0000
@@ -795,7 +795,7 @@
       <row>
        <entry><literal><function>setseed</function>(<type>dp</type>)</literal></entry>
        <entry><type>int</type></entry>
-       <entry>set seed for subsequent <literal>random()</literal> calls</entry>
+       <entry>set seed for subsequent <literal>random()</literal> calls (value between -1.0 and 1.0)</entry>
        <entry><literal>setseed(0.54823)</literal></entry>
        <entry><literal>1177314959</literal></entry>
       </row>

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Backend SSL configuration enhancement
Next
From: Dennis Bjorklund
Date:
Subject: Re: setseed() doc