Home Explore Blog CI



postgresql

15th chunk of `doc/src/sgml/brin.sgml`
14d6bbc92eca343b2eb9d238cc5b9553a603a0c677dfe89c0000000100000fa5
 <function>brin_minmax_opcinfo()</function></entry>
    </row>
    <row>
     <entry>Support Function 2</entry>
     <entry>internal function <function>brin_minmax_add_value()</function></entry>
    </row>
    <row>
     <entry>Support Function 3</entry>
     <entry>internal function <function>brin_minmax_consistent()</function></entry>
    </row>
    <row>
     <entry>Support Function 4</entry>
     <entry>internal function <function>brin_minmax_union()</function></entry>
    </row>
    <row>
     <entry>Operator Strategy 1</entry>
     <entry>operator less-than</entry>
    </row>
    <row>
     <entry>Operator Strategy 2</entry>
     <entry>operator less-than-or-equal-to</entry>
    </row>
    <row>
     <entry>Operator Strategy 3</entry>
     <entry>operator equal-to</entry>
    </row>
    <row>
     <entry>Operator Strategy 4</entry>
     <entry>operator greater-than-or-equal-to</entry>
    </row>
    <row>
     <entry>Operator Strategy 5</entry>
     <entry>operator greater-than</entry>
    </row>
   </tbody>
  </tgroup>
 </table>

 <para>
  To write an operator class for a complex data type which has values
  included within another type, it's possible to use the inclusion support
  functions alongside the corresponding operators, as shown
  in <xref linkend="brin-extensibility-inclusion-table"/>.  It requires
  only a single additional function, which can be written in any language.
  More functions can be defined for additional functionality.  All operators
  are optional.  Some operators require other operators, as shown as
  dependencies on the table.
 </para>

 <table id="brin-extensibility-inclusion-table">
  <title>Function and Support Numbers for Inclusion Operator Classes</title>
  <tgroup cols="3">
   <colspec colname="col1" colwidth="1*"/>
   <colspec colname="col2" colwidth="2*"/>
   <colspec colname="col3" colwidth="1*"/>
   <thead>
    <row>
     <entry>Operator class member</entry>
     <entry>Object</entry>
     <entry>Dependency</entry>
    </row>
   </thead>
   <tbody>
    <row>
     <entry>Support Function 1</entry>
     <entry>internal function <function>brin_inclusion_opcinfo()</function></entry>
     <entry></entry>
    </row>
    <row>
     <entry>Support Function 2</entry>
     <entry>internal function <function>brin_inclusion_add_value()</function></entry>
     <entry></entry>
    </row>
    <row>
     <entry>Support Function 3</entry>
     <entry>internal function <function>brin_inclusion_consistent()</function></entry>
     <entry></entry>
    </row>
    <row>
     <entry>Support Function 4</entry>
     <entry>internal function <function>brin_inclusion_union()</function></entry>
     <entry></entry>
    </row>
    <row>
     <entry>Support Function 11</entry>
     <entry>function to merge two elements</entry>
     <entry></entry>
    </row>
    <row>
     <entry>Support Function 12</entry>
     <entry>optional function to check whether two elements are mergeable</entry>
     <entry></entry>
    </row>
    <row>
     <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

Title: BRIN Operator Classes for Complex Data Types
Summary
BRIN operator classes can be defined for complex data types, such as those with inclusion relationships, using specific support functions and operator strategies. The inclusion support functions require a single additional function, and more functions can be defined for additional functionality. Operator strategies have dependencies on each other, and some are optional, allowing for flexibility in defining operator classes for various data types.