diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 218ac7ac1a..605f1b12c9 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,4 +1,4 @@ - + Data Types @@ -2706,7 +2706,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays A rich set of functions and operators is available to perform various geometric - operations such as scaling, translation, rotation, and determining + operations such as scaling, translation, rotation, and determining intersections. They are explained in . @@ -2718,8 +2718,9 @@ SELECT person.name, holidays.num_weeks FROM person, holidays - Points are the fundamental two-dimensional building block for geometric types. - Values of type point are specified using the following syntax: + Points are the fundamental two-dimensional building block for geometric + types. Values of type point are specified using either of + the following syntaxes: ( x , y ) @@ -2729,6 +2730,10 @@ SELECT person.name, holidays.num_weeks FROM person, holidays where x and y are the respective coordinates as floating-point numbers. + + + Points are output using the first syntax. + @@ -2744,11 +2749,13 @@ SELECT person.name, holidays.num_weeks FROM person, holidays Line segments (lseg) are represented by pairs of points. - Values of type lseg are specified using the following syntax: + Values of type lseg are specified using any of the following + syntaxes: +[ ( x1 , y1 ) , ( x2 , y2 ) ] ( ( x1 , y1 ) , ( x2 , y2 ) ) - ( x1 , y1 ) , ( x2 , y2 ) + ( x1 , y1 ) , ( x2 , y2 ) x1 , y1 , x2 , y2 @@ -2758,6 +2765,10 @@ SELECT person.name, holidays.num_weeks FROM person, holidays (x2,y2) are the end points of the line segment. + + + Line segments are output using the first syntax. + @@ -2774,11 +2785,12 @@ SELECT person.name, holidays.num_weeks FROM person, holidays Boxes are represented by pairs of points that are opposite corners of the box. - Values of type box are specified using the following syntax: + Values of type box are specified using any of the following + syntaxes: ( ( x1 , y1 ) , ( x2 , y2 ) ) - ( x1 , y1 ) , ( x2 , y2 ) + ( x1 , y1 ) , ( x2 , y2 ) x1 , y1 , x2 , y2 @@ -2790,11 +2802,13 @@ SELECT person.name, holidays.num_weeks FROM person, holidays - Boxes are output using the first syntax. - The corners are reordered on input to store - the upper right corner, then the lower left corner. - Other corners of the box can be entered, but the lower - left and upper right corners are determined from the input and stored. + Boxes are output using the second syntax. + + + + Any two opposite corners can be supplied on input, but the values + will be reordered as needed to store the + upper right and lower left corners, in that order. @@ -2814,20 +2828,22 @@ SELECT person.name, holidays.num_weeks FROM person, holidays - Values of type path are specified using the following syntax: + Values of type path are specified using any of the following + syntaxes: -( ( x1 , y1 ) , ... , ( xn , yn ) ) [ ( x1 , y1 ) , ... , ( xn , yn ) ] - ( x1 , y1 ) , ... , ( xn , yn ) - ( x1 , y1 , ... , xn , yn ) - x1 , y1 , ... , xn , yn +( ( x1 , y1 ) , ... , ( xn , yn ) ) + ( x1 , y1 ) , ... , ( xn , yn ) + ( x1 , y1 , ... , xn , yn ) + x1 , y1 , ... , xn , yn where the points are the end points of the line segments comprising the path. Square brackets ([]) indicate an open path, while parentheses (()) indicate a - closed path. + closed path. When the outermost parentheses are omitted, as + in the third through fifth syntaxes, a closed path is assumed. @@ -2850,7 +2866,8 @@ SELECT person.name, holidays.num_weeks FROM person, holidays - Values of type polygon are specified using the following syntax: + Values of type polygon are specified using any of the + following syntaxes: ( ( x1 , y1 ) , ... , ( xn , yn ) ) @@ -2877,7 +2894,8 @@ SELECT person.name, holidays.num_weeks FROM person, holidays Circles are represented by a center point and a radius. - Values of type circle are specified using the following syntax: + Values of type circle are specified using any of the + following syntaxes: < ( x , y ) , r > @@ -2887,8 +2905,9 @@ SELECT person.name, holidays.num_weeks FROM person, holidays where - (x,y) - is the center and r is the radius of the circle. + (x,y) + is the center and r is the radius of the + circle.