Chapter "8.8 Geometric Types" of documentation could contain more details

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: skalee(at)gmail(dot)com
Subject: Chapter "8.8 Geometric Types" of documentation could contain more details
Date: 2024-07-03 09:54:16
Message-ID: 172000045661.706.1822177575291548794@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/datatype-geometric.html
Description:

Hi, I am writing to suggest a couple of clarifications to "8.8. Geometric
Types" documentation chapter.

1. Documentation does not specify what precision is used when persisting
point coordinates. There are hints that it's 8 bytes per coordinate, but
neither can be taken for sure. Table "8.20. Geometric Types" says that a
point takes 16 bytes, which strongly suggests it's 8 bytes per coordinate,
but on the other hand, it could be less if a point definition also includes
some unspecified metadata. Section "8.8.1. Points" says "Values of type
point are specified […] where x and y are the respective coordinates, as
floating-point numbers.", however it is unclear what exact type of
floating-point numbers is meant.

My suggestion is to clearly describe which floating-point datatype is used
for point coordinates.

2. Documentation only partly clarifies what are the benefits of using
polygon datatype instead of path datatype. Section "8.8.6. Polygons" says
that "the essential difference is that a polygon is considered to include
the area within it, while a path is not", which clarifies that they are
meant to serve different purposes, but nothing more. Table "8.20. Geometric
Types" says that a polygon with n vertices takes 24 bytes more than a path
with n vertices, but that's all. Only chapter "9.11. Geometric Functions and
Operators" really helps in understanding that some functions and operators
are available to polygons but not to paths.

My suggestion is to:
a) point out that different operations can be performed on polygons and
closed paths
b) clarify what information is stored with a polygon that is not stored with
a closed path (these 24 bytes)
c) if there are some operations that perform better on polygons than on
closed paths, clarify that as well

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Peter Eisentraut 2024-07-03 10:40:16 Re: tutorial not accurate
Previous Message Peter Eisentraut 2024-07-03 09:49:25 Re: Document when ssl_prefer_server_ciphers went in