Bug #477: path ?# path

Lists: pgsql-bugs
From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #477: path ?# path
Date: 2001-10-09 19:17:09
Message-ID: 200110091917.f99JH9N64033@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Curtis Barrett (curtis(at)northwestern(dot)edu) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
path ?# path

Long Description
nothing major. the ?# (geometric intersection) operator for paths iterates over point pairs in each path testing for intersection. however, it ignores the last->first point pair for closed paths. a quick workaround is to tack the first point on the end of a closed path.

Sample Code
# select '((1,1),(2,0))'::path ?# '((0,0),(0,2),(2,2))'::path;
?column?
----------
f
(1 row)

# select '((1,1),(2,0))'::path ?# '((0,0),(0,2),(2,2),(0,0))'::path;
?column?
----------
t
(1 row)

No file was uploaded with this report


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: curtis(at)northwestern(dot)edu, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #477: path ?# path
Date: 2001-10-13 01:21:03
Message-ID: 200110130121.f9D1L3q18529@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


Can someone comment on this?

> Curtis Barrett (curtis(at)northwestern(dot)edu) reports a bug with a severity of 3
> The lower the number the more severe it is.
>
> Short Description
> path ?# path
>
> Long Description
> nothing major. the ?# (geometric intersection) operator for paths iterates over point pairs in each path testing for intersection. however, it ignores the last->first point pair for closed paths. a quick workaround is to tack the first point on the end of a closed path.
>
> Sample Code
> # select '((1,1),(2,0))'::path ?# '((0,0),(0,2),(2,2))'::path;
> ?column?
> ----------
> f
> (1 row)
>
> # select '((1,1),(2,0))'::path ?# '((0,0),(0,2),(2,2),(0,0))'::path;
> ?column?
> ----------
> t
> (1 row)
>
>
> No file was uploaded with this report
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: curtis(at)northwestern(dot)edu, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #477: path ?# path
Date: 2001-10-13 17:43:02
Message-ID: 20351.1002994982@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

pgsql-bugs(at)postgresql(dot)org writes:
> the ?# (geometric intersection) operator for paths iterates over point
> pairs in each path testing for intersection. however, it ignores the
> last->first point pair for closed paths.

Looks like a bug to me too; and path_distance, path_length, dist_ppath
also fail to consider the closing segment of a closed path.

Fixed for 7.2.

regards, tom lane