mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Implement poly_distance().
geo_ops.c contains half a dozen functions that are just stubs throwing ERRCODE_FEATURE_NOT_SUPPORTED. Since it's been like that for more than twenty years, there's clearly not a lot of interest in filling in the stubs. However, I'm uncomfortable with deleting poly_distance(), since every other geometric type supports a distance-to-another-object- of-the-same-type function. We can easily add this capability by cribbing from poly_overlap() and path_distance(). It's possible that the (existing) test case for this will show some numeric instability, but hopefully the buildfarm will expose it if so. In passing, improve the documentation to try to explain why polygons are distinct from closed paths in the first place. Discussion: https://postgr.es/m/3426566.1638832718@sss.pgh.pa.us
This commit is contained in:
@ -3562,8 +3562,9 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
|
||||
|
||||
<para>
|
||||
Polygons are represented by lists of points (the vertexes of the
|
||||
polygon). Polygons are very similar to closed paths, but are
|
||||
stored differently and have their own set of support routines.
|
||||
polygon). Polygons are very similar to closed paths; the essential
|
||||
difference is that a polygon is considered to include the area
|
||||
within it, while a path is not.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
Reference in New Issue
Block a user