8000 Fix assorted misstatements and poor wording in the descriptions of th… · liuhb86/postgres@5e77769 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 5e77769

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 fa8ccf5 commit 5e77769

File tree

1 file changed

+41
-22
lines changed

1 file changed

+41
-22
lines changed

doc/src/sgml/datatype.sgml

Lines changed: 41 additions & 22 deletions
8000
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.128.2.7 2008/01/02 19:53:15 mha Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.128.2.8 2010/07/03 04:03:46 tgl Exp $
33
-->
44

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

23262326
<para>
23272327
A rich set of functions and operators is available to perform various geometric
2328-
operations such as scaling, translation, rotation, and determining
2328+
operations such as scaling, translation, rotation, and determining
23292329
intersections. They are explained in <xref linkend="functions-geometry">.
23302330
</para>
23312331

@@ -2337,8 +2337,9 @@ SELECT * FROM test1 WHERE a;
23372337
</indexterm>
23382338

23392339
<para>
2340-
Points are the fundamental two-dimensional building block for geometric types.
2341-
Values of type <type>point</type> are specified using the following syntax:
2340+
Points are the fundamental two-dimensional building block for geometric
2341+
types. Values of type <type>point</type> are specified using either of
2342+
the following syntaxes:
23422343

23432344
<synopsis>
23442345
( <replaceable>x</replaceable> , <replaceable>y</replaceable> )
@@ -2348,6 +2349,10 @@ SELECT * FROM test1 WHERE a;
23482349
where <replaceable>x</> and <replaceable>y</> are the respective
23492350
coordinates as floating-point numbers.
23502351
</para>
2352+
2353+
<para>
2354+
Points are output using the first syntax.
2355+
</para>
23512356
</sect2>
23522357

23532358
<sect2>
@@ -2363,11 +2368,13 @@ SELECT * FROM test1 WHERE a;
23632368

23642369
<para>
23652370
Line segments (<type>lseg</type>) are represented by pairs of points.
2366-
Values of type <type>lseg</type> are specified using the following syntax:
2371+
Values of type <type>lseg</type> are specified using any of the following
2372+
syntaxes:
23672373

23682374
<synopsis>
2375+
[ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) ]
23692376
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) )
2370-
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
2377+
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
23712378
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , <replaceable>x2</replaceable> , <replaceable>y2</replaceable>
23722379
</synopsis>
23732380

@@ -2377,6 +2384,10 @@ SELECT * FROM test1 WHERE a;
23772384
<literal>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</literal>
23782385
are the end points of the line segment.
23792386
</para>
2387+
2388+
<para>
2389+
Line segments are output using the first syntax.
2390+
</para>
23802391
</sect2>
23812392

23822393
<sect2>
@@ -2393,7 +2404,8 @@ SELECT * FROM test1 WHERE a;
23932404
<para>
23942405
Boxes are represented by pairs of points that are opposite
23952406
corners of the box.
2396-
Values of type <type>box</type> is specified using the following syntax:
2407+
Values of type <type>box</type> are specified using any of the following
2408+
syntaxes:
23972409

23982410
<synopsis>
23992411
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) )
@@ -2409,11 +2421,13 @@ SELECT * FROM test1 WHERE a;
24092421
</para>
24102422

24112423
<para>
2412-
Boxes are output using the first syntax.
2413-
The corners are reordered on input to store
2414-
the upper right corner, then the lower left corner.
2415-
Other corners of the box can be entered, but the lower
2416-
left and upper right corners are determined from the input and stored corners.
2424+
Boxes are output using the second syntax.
2425+
</para>
2426+
2427+
<para>
2428+
Any two opposite corners can be supplied on input, but the values
2429+
will be reordered as needed to store the
2430+
upper right and lower left corners, in that order.
24172431
</para>
24182432
</sect2>
24192433

@@ -2440,20 +2454,22 @@ SELECT * FROM test1 WHERE a;
24402454
</para>
24412455

24422456
<para>
2443-
Values of type <type>path</type> are specified using the following syntax:
2457+
Values of type <type>path</type> are specified using any of the following
2458+
syntaxes:
24442459

24452460
<synopsis>
2446-
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
24472461
[ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) ]
2448-
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
2449-
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
2450-
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable>
2462+
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
2463+
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
2464+
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
2465+
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable>
24512466
</synopsis>
24522467

24532468
where the points are the end points of the line segments
24542469
comprising the path. Square brackets (<literal>[]</>) indicate
24552470
an open path, while parentheses (<literal>()</>) indicate a
2456-
closed path.
2471+
closed path. When the outermost parentheses are omitted, as
2472+
in the third through fifth syntaxes, a closed path is assumed.
24572473
</para>
24582474

24592475
<para>
@@ -2475,7 +2491,8 @@ SELECT * FROM test1 WHERE a;
24752491
</para>
24762492

24772493
<para>
2478-
Values of type <type>polygon</type> are specified using the following syntax:
2494+
Values of type <type>polygon</type> are specified using any of the
2495+
following syntaxes:
24792496

24802497
<synopsis>
24812498
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
@@ -2502,7 +2519,8 @@ SELECT * FROM test1 WHERE a;
25022519

25032520
<para>
25042521
Circles are represented by a center point and a radius.
2505-
Values of type <type>circle</type> are specified using the following syntax:
2522+
Values of type <type>circle</type> are specified using any of the
2523+
following syntaxes:
25062524

25072525
<synopsis>
25082526
&lt; ( <replaceable>x</replaceable> , <replaceable>y</replaceable> ) , <replaceable>r</replaceable> &gt;
@@ -2512,8 +2530,9 @@ SELECT * FROM test1 WHERE a;
25122530
</synopsis>
25132531

25142532
where
2515-
<literal>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</literal>
2516-
is the center and <replaceable>r</replaceable> is the radius of the circle.
2533+
<literal>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</>
2534+
is the center and <replaceable>r</replaceable> is the radius of the
2535+
circle.
25172536
</para>
25182537

25192538
<para>

0 commit comments

Comments
 (0)
0