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

From Gavin Flower
Subject Re: [postgis-users] Query with LIMIT but as random result set?
Date
Msg-id 50F050B1.2070107@archidevsys.co.nz
Whole thread Raw
In response to Re: [postgis-users] Query with LIMIT but as random result set?  (Bosco Rama <postgres@boscorama.com>)
Responses >
List pgsql-general
On 12/01/13 06:45, Bosco Rama wrote:
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.


Very definitely!  :-)

Me bad, as the saying goes...


Cheers,
Gavin

pgsql-general by date:

Previous
From: Bosco Rama
Date:
Subject: Re: [postgis-users] Query with LIMIT but as random result set?
Next
From: Kirk Wythers
Date:
Subject: psql copy from through bash