Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux