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

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix an ancient error in dist_ps (distance from point to line
Дата
Msg-id 20090623162502.773FE75331E@cvs.postgresql.org
обсуждение исходный текст
Список 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.

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        geo_ops.c (r1.101 -> r1.102)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/geo_ops.c?r1=1.101&r2=1.102)

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

Предыдущее
От: alvherre@pgfoundry.org (Alvaro Herrera)
Дата:
Сообщение: press - pr: Adding translated presskit from Jaime Casanova, plus some
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix an ancient error in dist_ps (distance from point to line