Re: Selecting pairs of numbers

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: Selecting pairs of numbers
Дата
Msg-id 5612CC02.2060201@iol.ie
обсуждение исходный текст
Ответ на Re: Selecting pairs of numbers  (John McKown <john.archie.mckown@gmail.com>)
Список pgsql-general
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
rod@iol.ie


В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Selecting pairs of numbers
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Selecting pairs of numbers