@@ -529,14 +529,79 @@ typedef struct BrinOpcInfo
529
529
</varlistentry>
530
530
</variablelist>
531
531
532
- To implement these methods in a generic way, the operator class
533
- defines its own internal support functions.
534
- (For instance, the <quote>min/max</> operator classes implement
535
- support functions for the four inequality operators for their data type.)
536
- Additionally, the operator class must supply appropriate
537
- operator entries,
538
- to enable the optimizer to use the index when those operators are
539
- used in queries.
532
+ The core distribution includes support for two types of operator classes:
533
+ minmax and inclusion. Operator class definitions using them are shipped for
534
+ in-core data types as appropriate. Additional operator classes can be
535
+ defined by the user for other datatypes using equivalent definitions,
536
+ without having to write any source code; appropriate catalog entries being
537
+ declared is enough. Note that assumptions about the semantics of operator
538
+ strategies are embedded in the support procedures's source code.
540
539
</para>
540
+
541
+ <para>
542
+ Operator classes that implement completely different semantics are also
543
+ possible, provided implementations of the four main support procedures
544
+ described above are written. Note that backwards compatibility across major
545
+ releases is not guaranteed: for example, additional support procedures might
546
+ be required in later releases.
547
+ </para>
548
+
549
+ <para>
550
+ To write an operator class for a datatype that implements a totally
551
+ ordered set, it is possible to use the Minmax support procedures
552
+ alongside the corresponding operators, as shown in
553
+ <xref linkend="brin-extensibility-minmax-table">.
554
+ All operator class members (procedures and operators) are mandatory.
555
+ </para>
556
+
557
+ <table id="brin-extensibility-minmax-table">
558
+ <title>Procedure and Support Numbers for Minmax Operator Classes</title>
559
+ <tgroup cols="2">
560
+ <thead>
561
+ <row>
562
+ <entry>Operator class member</entry>
563
+ <entry>Object</entry>
564
+ </row>
565
+ </thead>
566
+ <tbody>
567
+ <row>
568
+ <entry>Support Procedure 1</entry>
569
+ <entry>function <function>brin_minmax_opcinfo()</function></entry>
570
+ </row>
571
+ <row>
572
+ <entry>Support Procedure 2</entry>
573
+ <entry>function <function>brin_minmax_add_value()</function></entry>
574
+ </row>
575
+ <row>
576
+ <entry>Support Procedure 3</entry>
577
+ <entry>function <function>brin_minmax_consistent()</function></entry>
578
+ </row>
579
+ <row>
580
+ <entry>Support Procedure 4</entry>
581
+ <entry>function <function>brin_minmax_union()</function></entry>
582
+ </row>
583
+ <row>
584
+ <entry>Operator Strategy 1</entry>
585
+ <entry>operator less-than</entry>
586
+ </row>
587
+ <row>
588
+ <entry>Operator Strategy 2</entry>
589
+ <entry>operator less-than-or-equal-to</entry>
590
+ </row>
591
+ <row>
592
+ <entry>Operator Strategy 3</entry>
593
+ <entry>operator equal-to</entry>
594
+ </row>
595
+ <row>
596
+ <entry>Operator Strategy 4</entry>
597
+ <entry>operator greater-than-or-equal-to</entry>
598
+ </row>
599
+ <row>
600
+ <entry>Operator Strategy 5</entry>
601
+ <entry>operator greater-than</entry>
602
+ </row>
603
+ </tbody>
604
+ </tgroup>
605
+ </table>
541
606
</sect1>
542
607
</chapter>
0 commit comments