On 05/10/2015 20:03, John McKown wrote:
> When in doubt, cheat! Why not something like:
> 
> SELECT x, y FROM organ_pipes WHERE point(x,y) <@
> box(point(?x1,?y1),point(?x2,?y2)) ;
> 
> This is definitely a different approach from the others that I've seen.
> 
> 
> Basically, think of your channel / piston as a point in a Cartesian
> plane. And your boundaries as a box in that graph. So you see if the
> "point" is inside the "box"

Ohhh - that's nice! Reminds of one of my lecturers from college days,
who said there was often a geometrical solution to an algebraic problem.

Thanks!

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
r...@iol.ie


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

Reply via email to