Re: Bloom index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bloom index
Date: 2010-01-18 02:44:07
Message-ID: 19694.1263782647@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)edu> writes:
> The only thing that jumps out at me from the code itself is the use of
> rand() and srand() which seems unacceptable.

Yeah, (1) rand isn't a good random number generator and (2) fooling with
the main random number sequence is user-unfriendly. If you need a
private source of random numbers you might base it on erand48 like geqo
has done.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2010-01-18 02:57:21 Re: attoptions
Previous Message Tom Lane 2010-01-18 02:30:25 pgsql: Fix portalmem.c to avoid keeping a dangling pointer to a cached