From: Tom Lane Date: Thu, 4 Jul 2024 17:23:32 +0000 (-0400) Subject: Doc: small improvements in discussion of geometric data types. X-Git-Tag: REL_18_BETA1~2472 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=5a519abeddfe34659a8c0478f04a0acfd0d80ec6;p=postgresql.git 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 --- diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 6646820d6a0..e0d33f12e1c 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -3369,7 +3369,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays line - 32 bytes + 24 bytes Infinite line {A,B,C} @@ -3413,6 +3413,11 @@ SELECT person.name, holidays.num_weeks FROM person, holidays + + In all these types, the individual coordinates are stored as + double precision (float8) numbers. + + A rich set of functions and operators is available to perform various geometric operations such as scaling, translation, rotation, and determining @@ -3603,8 +3608,16 @@ SELECT person.name, holidays.num_weeks FROM person, holidays Polygons are represented by lists of points (the vertices of the 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. + semantic difference is that a polygon is considered to include the + area within it, while a path is not. + + + + 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.