Improve documentation of random() function.
authorTom Lane
Wed, 21 Jan 2015 02:21:41 +0000 (21:21 -0500)
committerTom Lane
Wed, 21 Jan 2015 02:21:41 +0000 (21:21 -0500)
Move random() and setseed() to a separate table, to have them grouped
together. Also add a notice that random() is not cryptographically secure.

Back-patch of commit 75fdcec14543b60cc0c67483d8cc47d5c7adf1a8 into
all supported versions, per discussion of the need to document that
random() is just a wrapper around random(3).

doc/src/sgml/func.sgml

index 947130753e0009266c86c9ae0547e24be71059d8..85a6f394f010f8d189072e855ce0e402e10bfef0 100644 (file)
        0.785398163397448
       
 
-      
-       
-        
-         random
-        
-        random()
-       
-       dp
-       random value in the range 0.0 <= x < 1.0
-       random()
-       
-      
-
       
        
         
        42.44
       
 
-      
-       
-        
-         setseed
-        
-        setseed(dp)
-       
-       void
-       set seed for subsequent random() calls (value between -1.0 and
-       1.0, inclusive)
-       setseed(0.54823)
-       
-      
-
       
        
         
     
    
 
+  
+     shows functions for
+    generating random numbers.
+  
+
+   
+    Random Functions
+
+    
+     
+      
+       Function
+       Return Type
+       Description
+      
+     
+     
+      
+       
+        
+         random
+        
+        random()
+       
+       dp
+       random value in the range 0.0 <= x < 1.0
+      
+
+      
+       
+        
+         setseed
+        
+        setseed(dp)
+       
+       void
+       set seed for subsequent random() calls (value between -1.0 and
+       1.0, inclusive)
+      
+     
+    
+   
+
+  
+   The characteristics of the values returned by
+   random() depend
+   on the system implementation. It is not suitable for cryptographic
+   applications; see  module for an alternative.
+   
+
   
    Finally,  shows the
    available trigonometric functions.  All trigonometric functions