Re: [PATCHES] setseed() doc

2006-09-20 Thread Neil Conway
On Mon, 2006-09-04 at 15:19 -0400, Tom Lane wrote:
 AFAICT it's just junk.  It happens to be the input times
 MAX_RANDOM_VALUE, but what use is that?  I wonder if we shouldn't
 change the function to return VOID

I agree. Given how soon we want to get an 8.2 beta out the door, perhaps
this change would be best postponed to 8.3 (unless there's another
outstanding 8.2 patch that requires initdb?).

-Neil



---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [PATCHES] setseed() doc

2006-09-04 Thread Dennis Bjorklund

Tom Lane skrev:



entryliteralfunctionsetseed/function(typedp/type)/literal/entry
entrytypeint/type/entry
-   entryset seed for subsequent literalrandom()/literal calls/entry
+   entryset seed for subsequent literalrandom()/literal calls (value 
between -1.0 and 1.0)/entry


Looking at the code, it would appear that the intended range is 0 to 1.


Ok.

What about the return value? The doc didn't say anything about it.

/Dennis

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [PATCHES] setseed() doc

2006-09-04 Thread Tom Lane
Dennis Bjorklund [EMAIL PROTECTED] writes:
 
 entryliteralfunctionsetseed/function(typedp/type)/literal/entry
 entrytypeint/type/entry
 -   entryset seed for subsequent literalrandom()/literal 
 calls/entry
 +   entryset seed for subsequent literalrandom()/literal calls 
 (value between -1.0 and 1.0)/entry

Looking at the code, it would appear that the intended range is 0 to 1.

regards, tom lane

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [PATCHES] setseed() doc

2006-09-04 Thread Tom Lane
Dennis Bjorklund [EMAIL PROTECTED] writes:
 What about the return value? The doc didn't say anything about it.

AFAICT it's just junk.  It happens to be the input times
MAX_RANDOM_VALUE, but what use is that?  I wonder if we shouldn't
change the function to return VOID ... that option wasn't available
when it was coded originally, else it'd probably have been done that
way.

regards, tom lane

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [PATCHES] setseed() doc

2006-09-04 Thread Bruce Momjian
Tom Lane wrote:
 Dennis Bjorklund [EMAIL PROTECTED] writes:
  
  entryliteralfunctionsetseed/function(typedp/type)/literal/entry
  entrytypeint/type/entry
  -   entryset seed for subsequent literalrandom()/literal 
  calls/entry
  +   entryset seed for subsequent literalrandom()/literal calls 
  (value between -1.0 and 1.0)/entry
 
 Looking at the code, it would appear that the intended range is 0 to 1.

Docs updated.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/func.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v
retrieving revision 1.332
diff -c -c -r1.332 func.sgml
*** doc/src/sgml/func.sgml	22 Aug 2006 00:49:19 -	1.332
--- doc/src/sgml/func.sgml	4 Sep 2006 21:45:15 -
***
*** 795,801 
row
 entryliteralfunctionsetseed/function(typedp/type)/literal/entry
 entrytypeint/type/entry
!entryset seed for subsequent literalrandom()/literal calls/entry
 entryliteralsetseed(0.54823)/literal/entry
 entryliteral1177314959/literal/entry
/row
--- 795,801 
row
 entryliteralfunctionsetseed/function(typedp/type)/literal/entry
 entrytypeint/type/entry
!entryset seed for subsequent literalrandom()/literal calls (value between 0 and 1.0)/entry
 entryliteralsetseed(0.54823)/literal/entry
 entryliteral1177314959/literal/entry
/row

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq