Re: [postgis-users] Query with LIMIT but as random result set? - Mailing list pgsql-general

From Bosco Rama
Subject Re: [postgis-users] Query with LIMIT but as random result set?
Date
Msg-id 50F04FA5.4050809@boscorama.com
Whole thread Raw
In response to Re: [postgis-users] Query with LIMIT but as random result set?  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Responses Re: [postgis-users] Query with LIMIT but as random result set?  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
List pgsql-general
On 01/11/13 09:31, Gavin Flower wrote:
> -- theta in radians
> -- for radius = 100
>
> INSERT INTO ranpoint
>      (id, theta, r)
> VALUES
>      (generate_series(1, 10), pi() * random(), 100 * random());

Shouldn't the value for theta be:
     2 * pi() * random()

Bosco.


pgsql-general by date:

Previous
From: Gavin Flower
Date:
Subject: Re: [postgis-users] Query with LIMIT but as random result set?
Next
From: Gavin Flower
Date:
Subject: Re: [postgis-users] Query with LIMIT but as random result set?