aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-07-04 13:23:32 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2024-07-04 13:23:32 -0400
commitac2ec6c57b38ea5baec08ef01d9cbabf1565017e (patch)
tree578efaab6412a7fbbbab427ce35695d29f9ce022
parent65b51c75415dde0a1782870d4746208438e7b3b4 (diff)
downloadpostgresql-ac2ec6c57b38ea5baec08ef01d9cbabf1565017e.tar.gz
postgresql-ac2ec6c57b38ea5baec08ef01d9cbabf1565017e.zip
Doc: small improvements in discussion of geometric data types.
State explicitly that the coordinates in our geometric data types are float8. Also explain that polygons store their bounding box. While here, fix the table of geometric data types to show type "line"'s size correctly: it's 24 bytes not 32. This has somehow escaped notice since that table was made in 1998. Per suggestion from Sebastian SkaƂacki. The size error seems important enough to justify back-patching. Discussion: https://postgr.es/m/172000045661.706.1822177575291548794@wrigleys.postgresql.org
-rw-r--r--doc/src/sgml/datatype.sgml20
1 files changed, 17 insertions, 3 deletions
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 1b4ba49dab9..b8b3b054246 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -3203,7 +3203,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
</row>
<row>
<entry><type>line</type></entry>
- <entry>32 bytes</entry>
+ <entry>24 bytes</entry>
<entry>Infinite line</entry>
<entry>{A,B,C}</entry>
</row>
@@ -3248,6 +3248,11 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
</table>
<para>
+ In all these types, the individual coordinates are stored as
+ <type>double precision</type> (<type>float8</type>) numbers.
+ </para>
+
+ <para>
A rich set of functions and operators is available to perform various geometric
operations such as scaling, translation, rotation, and determining
intersections. They are explained in <xref linkend="functions-geometry"/>.
@@ -3436,8 +3441,17 @@ 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
+ semantic difference is that a polygon is considered to include the
+ area within it, while a path is not.
+ </para>
+
+ <para>
+ An important implementation difference between polygons and
+ paths is that the stored representation of a polygon includes its
+ smallest bounding box. This speeds up certain search operations,
+ although computing the bounding box adds overhead while constructing
+ new polygons.
</para>
<para>