Обсуждение: [Fwd: [QUESTIONS] an apparent error in answer from "##" (closest proximity)operator]

Поиск
Список
Период
Сортировка

[Fwd: [QUESTIONS] an apparent error in answer from "##" (closest proximity)operator]

От
Gautam H Thaker
Дата:
Hi,

sorry to bug you as an individual, but I had no replies
at all to my postings below. Can you point me to a
place/person/source where I might try to seek an answer?

Thanks.

Gautam

=======
1st posting (2nd posting attached to this email.)
========
I am trying

drop table lines;
DROP

create table lines (
        l line
);
CREATE

insert into lines values ('((0,0),(1,2))'::line);
WARN:fmgr_info: function 0: cache lookup failed

EOF


If I change line to lseg everthing work ok.

I believe this is Postgres 6.3 (but I don't know how to
readily find that out on a running/installed version.
Is there  a way to know by looking into some file someplace?)

Thanks


--
Gautam H. Thaker
Distributed Processing Lab; Lockheed Martin Adv. Tech. Labs
A&E 3W; 1 Federal Street; Camden, NJ 08102
609-338-3907, fax 609-338-4144  email: gthaker@atl.lmco.com
template1=> select '(0,0)'::point ## '((2,0),(0,2))'::lseg as
closest_point;
closest_point
-------------
(1,1)
(1 row)

looks to be correct but


template1=> select '(1,1)'::point ## '((0,0),(0,2))'::lseg as
closest_point;
closest_point
-------------
(0,0)
(1 row)


seems to be in error as the closest point should be "(0,1)" on the lseg,
is it not?

(please excuse me if am totally brain dead here....)

--
Gautam H. Thaker
Distributed Processing Lab; Lockheed Martin Adv. Tech. Labs
A&E 3W; 1 Federal Street; Camden, NJ 08102
609-338-3907, fax 609-338-4144  email: gthaker@atl.lmco.com
--
Official WWW Site: http://www.postgresql.org
Online Docs & FAQ: http://www.postgresql.org/docs
Searchable Lists: http://www.postgresql.org/mhonarc

Re: CODE ANALYSIS FOR (an apparent error in answer from "##" (closest proximity)operator)

От
"Thomas G. Lockhart"
Дата:
> OK, I will try to work on this and provide you tested code.
> (Since this is my first attempt to code in Postgres
> it might take me a while though I have hacked for many
> years overall.)

No problem.

> Lines are more useful to me than lsegs. Is it easy
> enough to add these input/output routines so that I can
> continue to move forward prior to V6.4?

Yes. I'm starting to do that now, and we can coordinate patches. We may
as well copy the hackers list on at least our planning e-mails...

                      - Tom