Skip to content

Commit 971e110

Browse files
committed
Fix assorted misstatements and poor wording in the descriptions of the I/O
formats for geometric types. Per bug #5536 from Jon Strait, and my own testing. Back-patch to all supported branches, since this doco has been wrong right along -- we certainly haven't changed the I/O behavior of these types in many years.
1 parent 6ec7b0b commit 971e110

File tree

1 file changed

+42
-23
lines changed

1 file changed

+42
-23
lines changed

doc/src/sgml/datatype.sgml

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.154.4.3 2008/01/02 19:53:17 mha Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.154.4.4 2010/07/03 04:03:39 tgl Exp $
33
-->
44

55
<chapter id="datatype">
@@ -2375,7 +2375,7 @@ SELECT * FROM test1 WHERE a;
23752375

23762376
<para>
23772377
A rich set of functions and operators is available to perform various geometric
2378-
operations such as scaling, translation, rotation, and determining
2378+
operations such as scaling, translation, rotation, and determining
23792379
intersections. They are explained in <xref linkend="functions-geometry">.
23802380
</para>
23812381

@@ -2387,8 +2387,9 @@ SELECT * FROM test1 WHERE a;
23872387
</indexterm>
23882388

23892389
<para>
2390-
Points are the fundamental two-dimensional building block for geometric types.
2391-
Values of type <type>point</type> are specified using the following syntax:
2390+
Points are the fundamental two-dimensional building block for geometric
2391+
types. Values of type <type>point</type> are specified using either of
2392+
the following syntaxes:
23922393

23932394
<synopsis>
23942395
( <replaceable>x</replaceable> , <replaceable>y</replaceable> )
@@ -2398,6 +2399,10 @@ SELECT * FROM test1 WHERE a;
23982399
where <replaceable>x</> and <replaceable>y</> are the respective
23992400
coordinates as floating-point numbers.
24002401
</para>
2402+
2403+
<para>
2404+
Points are output using the first syntax.
2405+
</para>
24012406
</sect2>
24022407

24032408
<sect2>
@@ -2413,11 +2418,13 @@ SELECT * FROM test1 WHERE a;
24132418

24142419
<para>
24152420
Line segments (<type>lseg</type>) are represented by pairs of points.
2416-
Values of type <type>lseg</type> are specified using the following syntax:
2421+
Values of type <type>lseg</type> are specified using any of the following
2422+
syntaxes:
24172423

24182424
<synopsis>
2425+
[ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) ]
24192426
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) )
2420-
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
2427+
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
24212428
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , <replaceable>x2</replaceable> , <replaceable>y2</replaceable>
24222429
</synopsis>
24232430

@@ -2427,6 +2434,10 @@ SELECT * FROM test1 WHERE a;
24272434
<literal>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</literal>
24282435
are the end points of the line segment.
24292436
</para>
2437+
2438+
<para>
2439+
Line segments are output using the first syntax.
2440+
</para>
24302441
</sect2>
24312442

24322443
<sect2>
@@ -2443,11 +2454,12 @@ SELECT * FROM test1 WHERE a;
24432454
<para>
24442455
Boxes are represented by pairs of points that are opposite
24452456
corners of the box.
2446-
Values of type <type>box</type> are specified using the following syntax:
2457+
Values of type <type>box</type> are specified using any of the following
2458+
syntaxes:
24472459

24482460
<synopsis>
24492461
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) )
2450-
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
2462+
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
24512463
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , <replaceable>x2</replaceable> , <replaceable>y2</replaceable>
24522464
</synopsis>
24532465

@@ -2459,11 +2471,13 @@ SELECT * FROM test1 WHERE a;
24592471
</para>
24602472

24612473
<para>
2462-
Boxes are output using the first syntax.
2463-
The corners are reordered on input to store
2464-
the upper right corner, then the lower left corner.
2465-
Other corners of the box can be entered, but the lower
2466-
left and upper right corners are determined from the input and stored.
2474+
Boxes are output using the second syntax.
2475+
</para>
2476+
2477+
<para>
2478+
Any two opposite corners can be supplied on input, but the values
2479+
will be reordered as needed to store the
2480+
upper right and lower left corners, in that order.
24672481
</para>
24682482
</sect2>
24692483

@@ -2483,20 +2497,22 @@ SELECT * FROM test1 WHERE a;
24832497
</para>
24842498

24852499
<para>
2486-
Values of type <type>path</type> are specified using the following syntax:
2500+
Values of type <type>path</type> are specified using any of the following
2501+
syntaxes:
24872502

24882503
<synopsis>
2489-
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
24902504
[ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) ]
2491-
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
2492-
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
2493-
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable>
2505+
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
2506+
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
2507+
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
2508+
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable>
24942509
</synopsis>
24952510

24962511
where the points are the end points of the line segments
24972512
comprising the path. Square brackets (<literal>[]</>) indicate
24982513
an open path, while parentheses (<literal>()</>) indicate a
2499-
closed path.
2514+
closed path. When the outermost parentheses are omitted, as
2515+
in the third through fifth syntaxes, a closed path is assumed.
25002516
</para>
25012517

25022518
<para>
@@ -2519,7 +2535,8 @@ SELECT * FROM test1 WHERE a;
25192535
</para>
25202536

25212537
<para>
2522-
Values of type <type>polygon</type> are specified using the following syntax:
2538+
Values of type <type>polygon</type> are specified using any of the
2539+
following syntaxes:
25232540

25242541
<synopsis>
25252542
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
@@ -2546,7 +2563,8 @@ SELECT * FROM test1 WHERE a;
25462563

25472564
<para>
25482565
Circles are represented by a center point and a radius.
2549-
Values of type <type>circle</type> are specified using the following syntax:
2566+
Values of type <type>circle</type> are specified using any of the
2567+
following syntaxes:
25502568

25512569
<synopsis>
25522570
&lt; ( <replaceable>x</replaceable> , <replaceable>y</replaceable> ) , <replaceable>r</replaceable> &gt;
@@ -2556,8 +2574,9 @@ SELECT * FROM test1 WHERE a;
25562574
</synopsis>
25572575

25582576
where
2559-
<literal>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</literal>
2560-
is the center and <replaceable>r</replaceable> is the radius of the circle.
2577+
<literal>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</>
2578+
is the center and <replaceable>r</replaceable> is the radius of the
2579+
circle.
25612580
</para>
25622581

25632582
<para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy