From a4ac2f458e8cb76177254f4bd7bbd885991379af Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Tue, 6 Jul 1999 17:16:42 +0000 Subject: Fix markup for docbook2man man page generation. No big deal; fixed lots of other markup at the same time. Bigest change: make sure there is no whitespace in front of contents. This will probably help the other output types too. --- doc/src/sgml/ref/create_operator.sgml | 399 ++++++++++++++++------------------ 1 file changed, 191 insertions(+), 208 deletions(-) (limited to 'doc/src/sgml/ref/create_operator.sgml') diff --git a/doc/src/sgml/ref/create_operator.sgml b/doc/src/sgml/ref/create_operator.sgml index 1e745a45f7c..b6bb748ce25 100644 --- a/doc/src/sgml/ref/create_operator.sgml +++ b/doc/src/sgml/ref/create_operator.sgml @@ -1,23 +1,23 @@ - - - + + + CREATE OPERATOR - - SQL - Language Statements - - - + + SQL - Language Statements + + + CREATE OPERATOR - - + + Defines a new user operator - + - - - 1999-04-14 - - + + + 1999-04-14 + + CREATE OPERATOR name ( PROCEDURE = func_name [, LEFTARG = type1 ] @@ -30,166 +30,144 @@ CREATE OPERATOR name ( [, SORT1 = left_sort_op ] [, SORT2 = right_sort_op ] ) - + - - - 1999-04-14 - - + <refsect2 id="R2-SQL-CREATEOPERATOR-1"> + <refsect2info> + <date>1999-04-14</date> + </refsect2info> + <title> Inputs - - - - - - - name - - - - The operator to be defined. See below for allowable characters. - - - - - - func_name - - - -The function used to implement this operator. - - - - - - type1 - - - -The type for the left-hand side of the operator, if any. This option would be -omitted for a right-unary operator. - - - - - - type2 - - - -The type for the right-hand side of the operator, if any. This option would be -omitted for a left-unary operator. - - - - - - com_op - - - -The commutator for this operator. - - - - - - neg_op - - - -The negator of this operator. - - - - - - res_proc - - - -The restriction selectivity estimator function for this operator. - - - - - - join_proc - - - -The join selectivity estimator function for this operator. - - - - - -HASHES - - - + + + + + + name + + + The operator to be defined. See below for allowable characters. + + + + + func_name + + + The function used to implement this operator. + + + + + type1 + + + The type for the left-hand side of the operator, if any. This option would be + omitted for a right-unary operator. + + + + + type2 + + + The type for the right-hand side of the operator, if any. This option would be + omitted for a left-unary operator. + + + + + com_op + + + The commutator for this operator. + + + + + neg_op + + + The negator of this operator. + + + + + res_proc + + + The restriction selectivity estimator function for this operator. + + + + + join_proc + + + The join selectivity estimator function for this operator. + + + + + HASHES + + Indicates this operator can support a hash-join algorithm. - - - - - - left_sort_op - - - -Operator that sorts the left-hand data type of this operator. - - - - - - right_sort_op - - - -Operator that sorts the right-hand data type of this operator. - - - - + + + + + left_sort_op + + + Operator that sorts the left-hand data type of this operator. + + + + + right_sort_op + + + Operator that sorts the right-hand data type of this operator. + + + + + + - - - - - 1999-04-14 - - + <refsect2 id="R2-SQL-CREATEOPERATOR-2"> + <refsect2info> + <date>1999-04-14</date> + </refsect2info> + <title> Outputs - - - - - - CREATE - - - + + + + + +CREATE + + + Message returned if the operator is successfully created. - + - - - - - - 1999-04-14 - - + </refsect2> + </refsynopsisdiv> + + <refsect1 id="R1-SQL-CREATEOPERATOR-1"> + <refsect1info> + <date>1999-04-14</date> + </refsect1info> + <title> Description - - + + CREATE OPERATOR defines a new operator, name. The user who defines an operator becomes its owner. @@ -199,7 +177,7 @@ Operator that sorts the right-hand data type of this operator. is a sequence of up to thirty two (32) characters in any combination from the following: - + - * / < > = ~ ! @ # % ^ & | ` ? $ : ++ - * / < > = ~ ! @ # % ^ & | ` ? $ : @@ -234,12 +212,16 @@ Operator that sorts the right-hand data type of this operator. would probably have a commutator operator, area-greater-than, >>>. Hence, the query optimizer could freely convert: + - "0,0,1,1"::box >>> MYBOXES.description +"0,0,1,1"::box >>> MYBOXES.description + to + - MYBOXES.description <<< "0,0,1,1"::box +MYBOXES.description <<< "0,0,1,1"::box + This allows the execution code to always use the latter @@ -253,11 +235,11 @@ Operator that sorts the right-hand data type of this operator. equal, !==. The negator link allows the query optimizer to simplify - NOT MYBOXES.description === "0,0,1,1"::box +NOT MYBOXES.description === "0,0,1,1"::box to - MYBOXES.description !== "0,0,1,1"::box +MYBOXES.description !== "0,0,1,1"::box @@ -318,7 +300,7 @@ Operator that sorts the right-hand data type of this operator. the query optimizer can estimate result sizes. If a clause of the form: - MYBOXES.description <<< "0,0,1,1"::box +MYBOXES.description <<< "0,0,1,1"::box is present in the qualification, then Postgres may have to @@ -326,7 +308,7 @@ Operator that sorts the right-hand data type of this operator. satisfy the clause. The function res_proc must be a registered function (meaning it is already defined using - CREATE FUNCTION) which accepts arguments of the correct + CREATE FUNCTION) which accepts arguments of the correct data types and returns a floating point number. The query optimizer simply calls this function, passing the parameter "0,0,1,1" and multiplies the result by the relation @@ -343,11 +325,11 @@ Operator that sorts the right-hand data type of this operator. The difference between the function - my_procedure_1 (MYBOXES.description, "0,0,1,1"::box) +my_procedure_1 (MYBOXES.description, "0,0,1,1"::box) and the operator - MYBOXES.description === "0,0,1,1"::box +MYBOXES.description === "0,0,1,1"::box is that Postgres attempts to optimize operators and can @@ -356,34 +338,34 @@ Operator that sorts the right-hand data type of this operator. optimize functions, and they are performed by brute force. Moreover, functions can have any number of arguments while operators are restricted to one or two. - + - - - 1999-04-14 - - + <refsect2 id="R2-SQL-CREATEOPERATOR-3"> + <refsect2info> + <date>1999-04-14</date> + </refsect2info> + <title> Notes - - + + Refer to the chapter on operators in the PostgreSQL User's Guide for further information. Refer to DROP OPERATOR to delete user-defined operators from a database. - + - - + <refsect1 id="R1-SQL-CREATEOPERATOR-2"> + <title> Usage - - The following command defines a new operator, + + The following command defines a new operator, area-equality, for the BOX data type. - - - CREATE OPERATOR === ( + + +CREATE OPERATOR === ( LEFTARG = box, RIGHTARG = box, PROCEDURE = area_equal_procedure, @@ -393,36 +375,37 @@ Operator that sorts the right-hand data type of this operator. JOIN = area_join_procedure, HASHES, SORT1 = <<<, - SORT2 = <<<) - - + SORT2 = <<< +); + + - - + <refsect1 id="R1-SQL-CREATEOPERATOR-3"> + <title> Compatibility - - + + CREATE OPERATOR is a Postgres extension. - + - - - 1999-04-14 - - + <refsect2 id="R2-SQL-CREATEOPERATOR-4"> + <refsect2info> + <date>1999-04-14</date> + </refsect2info> + <title> SQL92 - - + + There is no CREATE OPERATOR statement in SQL92. - + - +