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?

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 @@
-       <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>
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to