Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcfac450

Browse files
committed
Doc: small improvements in discussion of geometric data types.
State explicitly that the coordinates in our geometric data types arefloat8. 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 somehowescaped notice since that table was made in 1998.Per suggestion from Sebastian Skałacki. The size error seemsimportant enough to justify back-patching.Discussion:https://postgr.es/m/172000045661.706.1822177575291548794@wrigleys.postgresql.org
1 parentfbe039f commitcfac450

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

‎doc/src/sgml/datatype.sgml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3264,7 +3264,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
32643264
</row>
32653265
<row>
32663266
<entry><type>line</type></entry>
3267-
<entry>32 bytes</entry>
3267+
<entry>24 bytes</entry>
32683268
<entry>Infinite line</entry>
32693269
<entry>{A,B,C}</entry>
32703270
</row>
@@ -3308,6 +3308,11 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
33083308
</tgroup>
33093309
</table>
33103310

3311+
<para>
3312+
In all these types, the individual coordinates are stored as
3313+
<type>double precision</type> (<type>float8</type>) numbers.
3314+
</para>
3315+
33113316
<para>
33123317
A rich set of functions and operators is available to perform various geometric
33133318
operations such as scaling, translation, rotation, and determining
@@ -3497,8 +3502,17 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
34973502

34983503
<para>
34993504
Polygons are represented by lists of points (the vertexes of the
3500-
polygon). Polygons are very similar to closed paths, but are
3501-
stored differently and have their own set of support routines.
3505+
polygon). Polygons are very similar to closed paths; the essential
3506+
semantic difference is that a polygon is considered to include the
3507+
area within it, while a path is not.
3508+
</para>
3509+
3510+
<para>
3511+
An important implementation difference between polygons and
3512+
paths is that the stored representation of a polygon includes its
3513+
smallest bounding box. This speeds up certain search operations,
3514+
although computing the bounding box adds overhead while constructing
3515+
new polygons.
35023516
</para>
35033517

35043518
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp