Home Explore Blog CI



postgresql

16th chunk of `doc/src/sgml/brin.sgml`
b934b57cf76ea158fb6f64cf56cec1b86df774874264fab10000000100000fa3
 <entry>Support Function 13</entry>
     <entry>optional function to check if an element is contained within another</entry>
     <entry></entry>
    </row>
    <row>
     <entry>Support Function 14</entry>
     <entry>optional function to check whether an element is empty</entry>
     <entry></entry>
    </row>
    <row>
     <entry>Operator Strategy 1</entry>
     <entry>operator left-of</entry>
     <entry>Operator Strategy 4</entry>
    </row>
    <row>
     <entry>Operator Strategy 2</entry>
     <entry>operator does-not-extend-to-the-right-of</entry>
     <entry>Operator Strategy 5</entry>
    </row>
    <row>
     <entry>Operator Strategy 3</entry>
     <entry>operator overlaps</entry>
     <entry></entry>
    </row>
    <row>
     <entry>Operator Strategy 4</entry>
     <entry>operator does-not-extend-to-the-left-of</entry>
     <entry>Operator Strategy 1</entry>
    </row>
    <row>
     <entry>Operator Strategy 5</entry>
     <entry>operator right-of</entry>
     <entry>Operator Strategy 2</entry>
    </row>
    <row>
     <entry>Operator Strategy 6, 18</entry>
     <entry>operator same-as-or-equal-to</entry>
     <entry>Operator Strategy 7</entry>
    </row>
    <row>
     <entry>Operator Strategy 7, 16, 24, 25</entry>
     <entry>operator contains-or-equal-to</entry>
     <entry></entry>
    </row>
    <row>
     <entry>Operator Strategy 8, 26, 27</entry>
     <entry>operator is-contained-by-or-equal-to</entry>
     <entry>Operator Strategy 3</entry>
    </row>
    <row>
     <entry>Operator Strategy 9</entry>
     <entry>operator does-not-extend-above</entry>
     <entry>Operator Strategy 11</entry>
    </row>
    <row>
     <entry>Operator Strategy 10</entry>
     <entry>operator is-below</entry>
     <entry>Operator Strategy 12</entry>
    </row>
    <row>
     <entry>Operator Strategy 11</entry>
     <entry>operator is-above</entry>
     <entry>Operator Strategy 9</entry>
    </row>
    <row>
     <entry>Operator Strategy 12</entry>
     <entry>operator does-not-extend-below</entry>
     <entry>Operator Strategy 10</entry>
    </row>
    <row>
     <entry>Operator Strategy 20</entry>
     <entry>operator less-than</entry>
     <entry>Operator Strategy 5</entry>
    </row>
    <row>
     <entry>Operator Strategy 21</entry>
     <entry>operator less-than-or-equal-to</entry>
     <entry>Operator Strategy 5</entry>
    </row>
    <row>
     <entry>Operator Strategy 22</entry>
     <entry>operator greater-than</entry>
     <entry>Operator Strategy 1</entry>
    </row>
    <row>
     <entry>Operator Strategy 23</entry>
     <entry>operator greater-than-or-equal-to</entry>
     <entry>Operator Strategy 1</entry>
    </row>
   </tbody>
  </tgroup>
 </table>

 <para>
    Support function numbers 1 through 10 are reserved for the BRIN internal
    functions, so the SQL level functions start with number 11.  Support
    function number 11 is the main function required to build the index.
    It should accept two arguments with the same data type as the operator class,
    and return the union of them.  The inclusion operator class can store union
    values with different data types if it is defined with the
    <literal>STORAGE</literal> parameter.  The return value of the union
    function should match the <literal>STORAGE</literal> data type.
 </para>

 <para>
    Support function numbers 12 and 14 are provided to support
    irregularities of built-in data types.  Function number 12
    is used to support network addresses from different families which
    are not mergeable.  Function number 14 is used to support
    empty ranges.  Function number 13 is an optional but
    recommended one, which allows the new value to be checked before
    it is passed to the union function.  As the BRIN framework can shortcut
    some operations when the union is not changed, using this
    function can improve index performance.
 </para>

 <para>
  To write an operator class for a data type that implements only an equality
  operator

Title: BRIN Operator Class Support Functions and Strategies
Summary
The BRIN operator class uses various support functions and operator strategies to manage data types, including those with inclusion relationships. Support functions 11-14 are used for specific purposes, such as calculating unions, checking mergeability, and handling empty ranges. Operator strategies define the relationships between data type values, including containment, overlap, and comparison operators. These functions and strategies work together to enable efficient indexing and querying of complex data types.