pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bosco Rama <postgres@boscorama.com>
To: PostGIS Users Discussion <postgis-users@lists.osgeo.org>
To: pgsql-general List <pgsql-general@postgresql.org>
Subject: Re: [postgis-users] Query with LIMIT but as random result set?
Date: Fri, 11 Jan 2013 09:45:09 -0800
Message-ID: <50F04FA5.4050809@boscorama.com> (raw)
In-Reply-To: <50F04C66.50209@archidevsys.co.nz>
References: <20130110202824.255780@gmx.com>
	<CAFcOn29kUGYvDo3HoTs1YcJj_WugPXpccHG+pf+WLHiopU95PQ@mail.gmail.com>
	<50F04C66.50209@archidevsys.co.nz>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.


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



view thread (8+ messages)  latest in thread

Message-ID: <50F04FA5.4050809@boscorama.com>
Permalink:  ../50F04FA5.4050809@boscorama.com/
Also on:    postgresql.org/message-id/50F04FA5.4050809@boscorama.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: postgres@boscorama.com, postgis-users@lists.osgeo.org
  Subject: Re: [postgis-users] Query with LIMIT but as random result set?
  In-Reply-To: <50F04FA5.4050809@boscorama.com>
  References: <20130110202824.255780@gmx.com> <CAFcOn29kUGYvDo3HoTs1YcJj_WugPXpccHG+pf+WLHiopU95PQ@mail.gmail.com> <50F04C66.50209@archidevsys.co.nz> <50F04FA5.4050809@boscorama.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox