1
1
<!--
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 $
3
3
-->
4
4
5
5
<chapter id="datatype">
@@ -2375,7 +2375,7 @@ SELECT * FROM test1 WHERE a;
2375
2375
2376
2376
<para>
2377
2377
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
2379
2379
intersections. They are explained in <xref linkend="functions-geometry">.
2380
2380
</para>
2381
2381
@@ -2387,8 +2387,9 @@ SELECT * FROM test1 WHERE a;
2387
2387
</indexterm>
2388
2388
2389
2389
<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:
2392
2393
2393
2394
<synopsis>
2394
2395
( <replaceable>x</replaceable> , <replaceable>y</replaceable> )
@@ -2398,6 +2399,10 @@ SELECT * FROM test1 WHERE a;
2398
2399
where <replaceable>x</> and <replaceable>y</> are the respective
2399
2400
coordinates as floating-point numbers.
2400
2401
</para>
2402
+
2403
+ <para>
2404
+ Points are output using the first syntax.
2405
+ </para>
2401
2406
</sect2>
2402
2407
2403
2408
<sect2>
@@ -2413,11 +2418,13 @@ SELECT * FROM test1 WHERE a;
2413
2418
2414
2419
<para>
2415
2420
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:
2417
2423
2418
2424
<synopsis>
2425
+ [ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) ]
2419
2426
( ( <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> )
2421
2428
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , <replaceable>x2</replaceable> , <replaceable>y2</replaceable>
2422
2429
</synopsis>
2423
2430
@@ -2427,6 +2434,10 @@ SELECT * FROM test1 WHERE a;
2427
2434
<literal>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</literal>
2428
2435
are the end points of the line segment.
2429
2436
</para>
2437
+
2438
+ <para>
2439
+ Line segments are output using the first syntax.
2440
+ </para>
2430
2441
</sect2>
2431
2442
2432
2443
<sect2>
@@ -2443,11 +2454,12 @@ SELECT * FROM test1 WHERE a;
2443
2454
<para>
2444
2455
Boxes are represented by pairs of points that are opposite
2445
2456
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:
2447
2459
2448
2460
<synopsis>
2449
2461
( ( <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> )
2451
2463
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , <replaceable>x2</replaceable> , <replaceable>y2</replaceable>
2452
2464
</synopsis>
2453
2465
@@ -2459,11 +2471,13 @@ SELECT * FROM test1 WHERE a;
2459
2471
</para>
2460
2472
2461
2473
<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.
2467
2481
</para>
2468
2482
</sect2>
2469
2483
@@ -2483,20 +2497,22 @@ SELECT * FROM test1 WHERE a;
2483
2497
</para>
2484
2498
2485
2499
<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:
2487
2502
2488
2503
<synopsis>
2489
- ( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
2490
2504
[ ( <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>
2494
2509
</synopsis>
2495
2510
2496
2511
where the points are the end points of the line segments
2497
2512
comprising the path. Square brackets (<literal>[]</>) indicate
2498
2513
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.
2500
2516
</para>
2501
2517
2502
2518
<para>
@@ -2519,7 +2535,8 @@ SELECT * FROM test1 WHERE a;
2519
2535
</para>
2520
2536
2521
2537
<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:
2523
2540
2524
2541
<synopsis>
2525
2542
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
@@ -2546,7 +2563,8 @@ SELECT * FROM test1 WHERE a;
2546
2563
2547
2564
<para>
2548
2565
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:
2550
2568
2551
2569
<synopsis>
2552
2570
< ( <replaceable>x</replaceable> , <replaceable>y</replaceable> ) , <replaceable>r</replaceable> >
@@ -2556,8 +2574,9 @@ SELECT * FROM test1 WHERE a;
2556
2574
</synopsis>
2557
2575
2558
2576
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.
2561
2580
</para>
2562
2581
2563
2582
<para>
0 commit comments