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

From: Bosco Rama <postgres(at)boscorama(dot)com>
To: PostGIS Users Discussion <postgis-users(at)lists(dot)osgeo(dot)org>, pgsql-general List <pgsql-general(at)postgresql(dot)org>
Subject: Re: [postgis-users] Query with LIMIT but as random result set?
Date: 2013-01-11 17:45:09
Message-ID: 50F04FA5.4050809@boscorama.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gavin Flower 2013-01-11 17:49:37 Re: [postgis-users] Query with LIMIT but as random result set?
Previous Message Gavin Flower 2013-01-11 17:31:18 Re: [postgis-users] Query with LIMIT but as random result set?