| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера