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

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Bosco Rama <postgres(at)boscorama(dot)com>
Cc: 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:49:37
Message-ID: 50F050B1.2070107@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

  • > at 2013-01-11 21:44:46 from Gavan Schneider

Browse pgsql-general by date

  From Date Subject
Next Message Kirk Wythers 2013-01-11 18:13:15 psql copy from through bash
Previous Message Bosco Rama 2013-01-11 17:45:09 Re: [postgis-users] Query with LIMIT but as random result set?