Home Explore Blog CI



postgresql

19th chunk of `doc/src/sgml/brin.sgml`
cb9c9af51f685c6fb83b8d065eaac2efce5c2554f34bd49d0000000100000bcc
 improve handling of outlier values.
  It is possible to use the minmax-multi support procedures alongside the
  corresponding operators, as shown in
  <xref linkend="brin-extensibility-minmax-multi-table"/>.
  All operator class members (procedures and operators) are mandatory.
 </para>

 <table id="brin-extensibility-minmax-multi-table">
  <title>Procedure and Support Numbers for minmax-multi Operator Classes</title>
  <tgroup cols="2">
   <thead>
    <row>
     <entry>Operator class member</entry>
     <entry>Object</entry>
    </row>
   </thead>
   <tbody>
    <row>
     <entry>Support Procedure 1</entry>
     <entry>internal function <function>brin_minmax_multi_opcinfo()</function></entry>
    </row>
    <row>
     <entry>Support Procedure 2</entry>
     <entry>internal function <function>brin_minmax_multi_add_value()</function></entry>
    </row>
    <row>
     <entry>Support Procedure 3</entry>
     <entry>internal function <function>brin_minmax_multi_consistent()</function></entry>
    </row>
    <row>
     <entry>Support Procedure 4</entry>
     <entry>internal function <function>brin_minmax_multi_union()</function></entry>
    </row>
    <row>
     <entry>Support Procedure 5</entry>
     <entry>internal function <function>brin_minmax_multi_options()</function></entry>
    </row>
    <row>
     <entry>Support Procedure 11</entry>
     <entry>function to compute distance between two values (length of a range)</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>
    Both minmax and inclusion operator classes support cross-data-type
    operators, though with these the dependencies become more complicated.
    The minmax operator class requires a full set of operators to be
    defined with both arguments having the same data type.  It allows
    additional data types to be supported by defining extra sets
    of operators.  Inclusion operator class operator strategies are dependent
    on another operator strategy as shown in
    <xref linkend="brin-extensibility-inclusion-table"/>, or the same
    operator strategy as themselves.  They require the dependency
    operator to be defined with the <literal>STORAGE</literal> data type as the
    left-hand-side argument and the other supported data type to be the
    right-hand-side argument of the supported operator.  See
    <literal>float4_minmax_ops</literal> as an example of minmax, and
    <literal>box_inclusion_ops</literal> as an example of inclusion.
 </para>
</sect2>
</sect1>

Title: Minmax-Multi and Inclusion Operator Classes
Summary
The minmax-multi operator class supports handling of outlier values by summarizing values into multiple intervals. It requires mandatory support procedures and operators, which are outlined in a table. Additionally, both minmax and inclusion operator classes support cross-data-type operators, but with complex dependencies. They require specific operator strategies and definitions to support additional data types, as demonstrated by examples such as float4_minmax_ops and box_inclusion_ops.