Skip site navigation (1) Skip section navigation (2)

pgsql: Fix an ancient error in dist_ps (distance from point to line

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix an ancient error in dist_ps (distance from point to line
Date: 2009-06-23 16:25:35
Message-ID: 20090623162535.E931F75331E@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Fix an ancient error in dist_ps (distance from point to line segment), which
a number of other geometric operators also depend on.  It miscalculated the
slope of the perpendicular to the given line segment anytime that slope was
other than 0, infinite, or +/-1.  In some cases the error would be masked
because the true closest point on the line segment was one of its endpoints
rather than the intersection point, but in other cases it could give an
arbitrarily bad answer.  Per bug #4872 from Nick Roosevelt.

Bug goes clear back to Berkeley days, so patch all supported branches.
Make a couple of cosmetic adjustments while at it.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        geo_ops.c (r1.82.2.3 -> r1.82.2.4)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/geo_ops.c?r1=1.82.2.3&r2=1.82.2.4)

pgsql-committers by date

Next:From: Magnus HaganderDate: 2009-06-23 18:13:23
Subject: pgsql: Properly initialize SSL engines when used from libpq.
Previous:From: Tom LaneDate: 2009-06-23 16:25:28
Subject: pgsql: Fix an ancient error in dist_ps (distance from point to line

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group