1 <!-- doc/src/sgml/brin.sgml -->
4 <title>BRIN Indexes
</title>
7 <primary>index
</primary>
8 <secondary>BRIN
</secondary>
11 <sect2 id=
"brin-intro">
12 <title>Introduction
</title>
15 <acronym>BRIN
</acronym> stands for Block Range Index.
16 <acronym>BRIN
</acronym> is designed for handling very large tables
17 in which certain columns have some natural correlation with their
18 physical location within the table.
22 <acronym>BRIN
</acronym> works in terms of
<firstterm>block ranges
</firstterm>
23 (or
<quote>page ranges
</quote>).
24 A block range is a group of pages that are physically
25 adjacent in the table; for each block range, some summary info is stored
27 For example, a table storing a store's sale orders might have
28 a date column on which each order was placed, and most of the time
29 the entries for earlier orders will appear earlier in the table as well;
30 a table storing a ZIP code column might have all codes for a city
31 grouped together naturally.
35 <acronym>BRIN
</acronym> indexes can satisfy queries via regular bitmap
36 index scans, and will return all tuples in all pages within each range if
37 the summary info stored by the index is
<firstterm>consistent
</firstterm> with the
39 The query executor is in charge of rechecking these tuples and discarding
40 those that do not match the query conditions
— in other words, these
42 Because a
<acronym>BRIN
</acronym> index is very small, scanning the index
43 adds little overhead compared to a sequential scan, but may avoid scanning
44 large parts of the table that are known not to contain matching tuples.
48 The specific data that a
<acronym>BRIN
</acronym> index will store,
49 as well as the specific queries that the index will be able to satisfy,
50 depend on the operator class selected for each column of the index.
51 Data types having a linear sort order can have operator classes that
52 store the minimum and maximum value within each block range, for instance;
53 geometrical types might store the bounding box for all the objects
58 The size of the block range is determined at index creation time by
59 the
<literal>pages_per_range
</literal> storage parameter. The number of index
60 entries will be equal to the size of the relation in pages divided by
61 the selected value for
<literal>pages_per_range
</literal>. Therefore, the smaller
62 the number, the larger the index becomes (because of the need to
63 store more index entries), but at the same time the summary data stored can
64 be more precise and more data blocks can be skipped during an index scan.
67 <sect3 id=
"brin-operation">
68 <title>Index Maintenance
</title>
71 At the time of creation, all existing heap pages are scanned and a
72 summary index tuple is created for each range, including the
73 possibly-incomplete range at the end.
74 As new pages are filled with data, page ranges that are already
75 summarized will cause the summary information to be updated with data
77 When a new page is created that does not fall within the last
78 summarized range, the range that the new page belongs to
79 does not automatically acquire a summary tuple;
80 those tuples remain unsummarized until a summarization run is
81 invoked later, creating the initial summary for that range.
85 There are several ways to trigger the initial summarization of a page range.
86 If the table is vacuumed, either manually or by
87 <link linkend=
"autovacuum">autovacuum
</link>, all existing unsummarized
88 page ranges are summarized.
90 <xref linkend=
"index-reloption-autosummarize"/> parameter is enabled,
91 which it isn't by default,
92 whenever autovacuum runs in that database, summarization will occur for all
93 unsummarized page ranges that have been filled,
94 regardless of whether the table itself is processed by autovacuum; see below.
98 Lastly, the following functions can be used (while these functions run,
99 <xref linkend=
"guc-search-path"/> is temporarily changed to
100 <literal>pg_catalog, pg_temp
</literal>):
103 <function>brin_summarize_new_values(regclass)
</function>
104 which summarizes all unsummarized ranges;
107 <function>brin_summarize_range(regclass, bigint)
</function>
108 which summarizes only the range containing the given page,
109 if it is unsummarized.
115 When autosummarization is enabled, a request is sent to
116 <literal>autovacuum
</literal> to execute a targeted summarization
117 for a block range when an insertion is detected for the first item
118 of the first page of the next block range,
119 to be fulfilled the next time an autovacuum
120 worker finishes running in the
121 same database. If the request queue is full, the request is not recorded
122 and a message is sent to the server log:
124 LOG: request for BRIN range summarization for index
"brin_wi_idx" page
128 was not recorded
126 When this happens, the range will remain unsummarized until the next
127 regular vacuum run on the table, or one of the functions mentioned above
132 Conversely, a range can be de-summarized using the
133 <function>brin_desummarize_range(regclass, bigint)
</function> function,
134 which is useful when the index tuple is no longer a very good
135 representation because the existing values have changed.
136 See
<xref linkend=
"functions-admin-index"/> for details.
142 <sect2 id=
"brin-builtin-opclasses">
143 <title>Built-in Operator Classes
</title>
146 The core
<productname>PostgreSQL
</productname> distribution
147 includes the
<acronym>BRIN
</acronym> operator classes shown in
148 <xref linkend=
"brin-builtin-opclasses-table"/>.
152 The
<firstterm>minmax
</firstterm>
153 operator classes store the minimum and the maximum values appearing
154 in the indexed column within the range. The
<firstterm>inclusion
</firstterm>
155 operator classes store a value which includes the values in the indexed
156 column within the range. The
<firstterm>bloom
</firstterm> operator
157 classes build a Bloom filter for all values in the range. The
158 <firstterm>minmax-multi
</firstterm> operator classes store multiple
159 minimum and maximum values, representing values appearing in the indexed
160 column within the range.
163 <table id=
"brin-builtin-opclasses-table">
164 <title>Built-in
<acronym>BRIN
</acronym> Operator Classes
</title>
169 <entry>Indexable Operators
</entry>
174 <entry valign=
"middle" morerows=
"4"><literal>bit_minmax_ops
</literal></entry>
175 <entry><literal>= (bit,bit)
</literal></entry>
177 <row><entry><literal>< (bit,bit)
</literal></entry></row>
178 <row><entry><literal>> (bit,bit)
</literal></entry></row>
179 <row><entry><literal><= (bit,bit)
</literal></entry></row>
180 <row><entry><literal>>= (bit,bit)
</literal></entry></row>
183 <entry valign=
"middle" morerows=
"12"><literal>box_inclusion_ops
</literal></entry>
184 <entry><literal>@
> (box,point)
</literal></entry>
186 <row><entry><literal><< (box,box)
</literal></entry></row>
187 <row><entry><literal>&< (box,box)
</literal></entry></row>
188 <row><entry><literal>&> (box,box)
</literal></entry></row>
189 <row><entry><literal>>> (box,box)
</literal></entry></row>
190 <row><entry><literal><@ (box,box)
</literal></entry></row>
191 <row><entry><literal>@
> (box,box)
</literal></entry></row>
192 <row><entry><literal>~= (box,box)
</literal></entry></row>
193 <row><entry><literal>&& (box,box)
</literal></entry></row>
194 <row><entry><literal><<| (box,box)
</literal></entry></row>
195 <row><entry><literal>&<| (box,box)
</literal></entry></row>
196 <row><entry><literal>|
&> (box,box)
</literal></entry></row>
197 <row><entry><literal>|
>> (box,box)
</literal></entry></row>
200 <entry valign=
"middle"><literal>bpchar_bloom_ops
</literal></entry>
201 <entry><literal>= (character,character)
</literal></entry>
205 <entry valign=
"middle" morerows=
"4"><literal>bpchar_minmax_ops
</literal></entry>
206 <entry><literal>= (character,character)
</literal></entry>
208 <row><entry><literal>< (character,character)
</literal></entry></row>
209 <row><entry><literal><= (character,character)
</literal></entry></row>
210 <row><entry><literal>> (character,character)
</literal></entry></row>
211 <row><entry><literal>>= (character,character)
</literal></entry></row>
214 <entry valign=
"middle"><literal>bytea_bloom_ops
</literal></entry>
215 <entry><literal>= (bytea,bytea)
</literal></entry>
219 <entry valign=
"middle" morerows=
"4"><literal>bytea_minmax_ops
</literal></entry>
220 <entry><literal>= (bytea,bytea)
</literal></entry>
222 <row><entry><literal>< (bytea,bytea)
</literal></entry></row>
223 <row><entry><literal><= (bytea,bytea)
</literal></entry></row>
224 <row><entry><literal>> (bytea,bytea)
</literal></entry></row>
225 <row><entry><literal>>= (bytea,bytea)
</literal></entry></row>
228 <entry valign=
"middle"><literal>char_bloom_ops
</literal></entry>
229 <entry><literal>= (
"char",
"char")
</literal></entry>
233 <entry valign=
"middle" morerows=
"4"><literal>char_minmax_ops
</literal></entry>
234 <entry><literal>= (
"char",
"char")
</literal></entry>
236 <row><entry><literal>< (
"char",
"char")
</literal></entry></row>
237 <row><entry><literal><= (
"char",
"char")
</literal></entry></row>
238 <row><entry><literal>> (
"char",
"char")
</literal></entry></row>
239 <row><entry><literal>>= (
"char",
"char")
</literal></entry></row>
242 <entry valign=
"middle"><literal>date_bloom_ops
</literal></entry>
243 <entry><literal>= (date,date)
</literal></entry>
247 <entry valign=
"middle" morerows=
"4"><literal>date_minmax_ops
</literal></entry>
248 <entry><literal>= (date,date)
</literal></entry>
250 <row><entry><literal>< (date,date)
</literal></entry></row>
251 <row><entry><literal><= (date,date)
</literal></entry></row>
252 <row><entry><literal>> (date,date)
</literal></entry></row>
253 <row><entry><literal>>= (date,date)
</literal></entry></row>
256 <entry valign=
"middle" morerows=
"4"><literal>date_minmax_multi_ops
</literal></entry>
257 <entry><literal>= (date,date)
</literal></entry>
259 <row><entry><literal>< (date,date)
</literal></entry></row>
260 <row><entry><literal><= (date,date)
</literal></entry></row>
261 <row><entry><literal>> (date,date)
</literal></entry></row>
262 <row><entry><literal>>= (date,date)
</literal></entry></row>
265 <entry valign=
"middle"><literal>float4_bloom_ops
</literal></entry>
266 <entry><literal>= (float4,float4)
</literal></entry>
270 <entry valign=
"middle" morerows=
"4"><literal>float4_minmax_ops
</literal></entry>
271 <entry><literal>= (float4,float4)
</literal></entry>
273 <row><entry><literal>< (float4,float4)
</literal></entry></row>
274 <row><entry><literal>> (float4,float4)
</literal></entry></row>
275 <row><entry><literal><= (float4,float4)
</literal></entry></row>
276 <row><entry><literal>>= (float4,float4)
</literal></entry></row>
279 <entry valign=
"middle" morerows=
"4"><literal>float4_minmax_multi_ops
</literal></entry>
280 <entry><literal>= (float4,float4)
</literal></entry>
282 <row><entry><literal>< (float4,float4)
</literal></entry></row>
283 <row><entry><literal>> (float4,float4)
</literal></entry></row>
284 <row><entry><literal><= (float4,float4)
</literal></entry></row>
285 <row><entry><literal>>= (float4,float4)
</literal></entry></row>
288 <entry valign=
"middle"><literal>float8_bloom_ops
</literal></entry>
289 <entry><literal>= (float8,float8)
</literal></entry>
293 <entry valign=
"middle" morerows=
"4"><literal>float8_minmax_ops
</literal></entry>
294 <entry><literal>= (float8,float8)
</literal></entry>
296 <row><entry><literal>< (float8,float8)
</literal></entry></row>
297 <row><entry><literal><= (float8,float8)
</literal></entry></row>
298 <row><entry><literal>> (float8,float8)
</literal></entry></row>
299 <row><entry><literal>>= (float8,float8)
</literal></entry></row>
302 <entry valign=
"middle" morerows=
"4"><literal>float8_minmax_multi_ops
</literal></entry>
303 <entry><literal>= (float8,float8)
</literal></entry>
305 <row><entry><literal>< (float8,float8)
</literal></entry></row>
306 <row><entry><literal><= (float8,float8)
</literal></entry></row>
307 <row><entry><literal>> (float8,float8)
</literal></entry></row>
308 <row><entry><literal>>= (float8,float8)
</literal></entry></row>
311 <entry valign=
"middle" morerows=
"5"><literal>inet_inclusion_ops
</literal></entry>
312 <entry><literal><< (inet,inet)
</literal></entry>
314 <row><entry><literal><<= (inet,inet)
</literal></entry></row>
315 <row><entry><literal>>> (inet,inet)
</literal></entry></row>
316 <row><entry><literal>>>= (inet,inet)
</literal></entry></row>
317 <row><entry><literal>= (inet,inet)
</literal></entry></row>
318 <row><entry><literal>&& (inet,inet)
</literal></entry></row>
321 <entry valign=
"middle"><literal>inet_bloom_ops
</literal></entry>
322 <entry><literal>= (inet,inet)
</literal></entry>
326 <entry valign=
"middle" morerows=
"4"><literal>inet_minmax_ops
</literal></entry>
327 <entry><literal>= (inet,inet)
</literal></entry>
329 <row><entry><literal>< (inet,inet)
</literal></entry></row>
330 <row><entry><literal><= (inet,inet)
</literal></entry></row>
331 <row><entry><literal>> (inet,inet)
</literal></entry></row>
332 <row><entry><literal>>= (inet,inet)
</literal></entry></row>
335 <entry valign=
"middle" morerows=
"4"><literal>inet_minmax_multi_ops
</literal></entry>
336 <entry><literal>= (inet,inet)
</literal></entry>
338 <row><entry><literal>< (inet,inet)
</literal></entry></row>
339 <row><entry><literal><= (inet,inet)
</literal></entry></row>
340 <row><entry><literal>> (inet,inet)
</literal></entry></row>
341 <row><entry><literal>>= (inet,inet)
</literal></entry></row>
344 <entry valign=
"middle"><literal>int2_bloom_ops
</literal></entry>
345 <entry><literal>= (int2,int2)
</literal></entry>
349 <entry valign=
"middle" morerows=
"4"><literal>int2_minmax_ops
</literal></entry>
350 <entry><literal>= (int2,int2)
</literal></entry>
352 <row><entry><literal>< (int2,int2)
</literal></entry></row>
353 <row><entry><literal>> (int2,int2)
</literal></entry></row>
354 <row><entry><literal><= (int2,int2)
</literal></entry></row>
355 <row><entry><literal>>= (int2,int2)
</literal></entry></row>
358 <entry valign=
"middle" morerows=
"4"><literal>int2_minmax_multi_ops
</literal></entry>
359 <entry><literal>= (int2,int2)
</literal></entry>
361 <row><entry><literal>< (int2,int2)
</literal></entry></row>
362 <row><entry><literal>> (int2,int2)
</literal></entry></row>
363 <row><entry><literal><= (int2,int2)
</literal></entry></row>
364 <row><entry><literal>>= (int2,int2)
</literal></entry></row>
367 <entry valign=
"middle"><literal>int4_bloom_ops
</literal></entry>
368 <entry><literal>= (int4,int4)
</literal></entry>
372 <entry valign=
"middle" morerows=
"4"><literal>int4_minmax_ops
</literal></entry>
373 <entry><literal>= (int4,int4)
</literal></entry>
375 <row><entry><literal>< (int4,int4)
</literal></entry></row>
376 <row><entry><literal>> (int4,int4)
</literal></entry></row>
377 <row><entry><literal><= (int4,int4)
</literal></entry></row>
378 <row><entry><literal>>= (int4,int4)
</literal></entry></row>
381 <entry valign=
"middle" morerows=
"4"><literal>int4_minmax_multi_ops
</literal></entry>
382 <entry><literal>= (int4,int4)
</literal></entry>
384 <row><entry><literal>< (int4,int4)
</literal></entry></row>
385 <row><entry><literal>> (int4,int4)
</literal></entry></row>
386 <row><entry><literal><= (int4,int4)
</literal></entry></row>
387 <row><entry><literal>>= (int4,int4)
</literal></entry></row>
390 <entry valign=
"middle"><literal>int8_bloom_ops
</literal></entry>
391 <entry><literal>= (bigint,bigint)
</literal></entry>
395 <entry valign=
"middle" morerows=
"4"><literal>int8_minmax_ops
</literal></entry>
396 <entry><literal>= (bigint,bigint)
</literal></entry>
398 <row><entry><literal>< (bigint,bigint)
</literal></entry></row>
399 <row><entry><literal>> (bigint,bigint)
</literal></entry></row>
400 <row><entry><literal><= (bigint,bigint)
</literal></entry></row>
401 <row><entry><literal>>= (bigint,bigint)
</literal></entry></row>
404 <entry valign=
"middle" morerows=
"4"><literal>int8_minmax_multi_ops
</literal></entry>
405 <entry><literal>= (bigint,bigint)
</literal></entry>
407 <row><entry><literal>< (bigint,bigint)
</literal></entry></row>
408 <row><entry><literal>> (bigint,bigint)
</literal></entry></row>
409 <row><entry><literal><= (bigint,bigint)
</literal></entry></row>
410 <row><entry><literal>>= (bigint,bigint)
</literal></entry></row>
413 <entry valign=
"middle"><literal>interval_bloom_ops
</literal></entry>
414 <entry><literal>= (interval,interval)
</literal></entry>
418 <entry valign=
"middle" morerows=
"4"><literal>interval_minmax_ops
</literal></entry>
419 <entry><literal>= (interval,interval)
</literal></entry>
421 <row><entry><literal>< (interval,interval)
</literal></entry></row>
422 <row><entry><literal><= (interval,interval)
</literal></entry></row>
423 <row><entry><literal>> (interval,interval)
</literal></entry></row>
424 <row><entry><literal>>= (interval,interval)
</literal></entry></row>
427 <entry valign=
"middle" morerows=
"4"><literal>interval_minmax_multi_ops
</literal></entry>
428 <entry><literal>= (interval,interval)
</literal></entry>
430 <row><entry><literal>< (interval,interval)
</literal></entry></row>
431 <row><entry><literal><= (interval,interval)
</literal></entry></row>
432 <row><entry><literal>> (interval,interval)
</literal></entry></row>
433 <row><entry><literal>>= (interval,interval)
</literal></entry></row>
436 <entry valign=
"middle"><literal>macaddr_bloom_ops
</literal></entry>
437 <entry><literal>= (macaddr,macaddr)
</literal></entry>
441 <entry valign=
"middle" morerows=
"4"><literal>macaddr_minmax_ops
</literal></entry>
442 <entry><literal>= (macaddr,macaddr)
</literal></entry>
444 <row><entry><literal>< (macaddr,macaddr)
</literal></entry></row>
445 <row><entry><literal><= (macaddr,macaddr)
</literal></entry></row>
446 <row><entry><literal>> (macaddr,macaddr)
</literal></entry></row>
447 <row><entry><literal>>= (macaddr,macaddr)
</literal></entry></row>
450 <entry valign=
"middle" morerows=
"4"><literal>macaddr_minmax_multi_ops
</literal></entry>
451 <entry><literal>= (macaddr,macaddr)
</literal></entry>
453 <row><entry><literal>< (macaddr,macaddr)
</literal></entry></row>
454 <row><entry><literal><= (macaddr,macaddr)
</literal></entry></row>
455 <row><entry><literal>> (macaddr,macaddr)
</literal></entry></row>
456 <row><entry><literal>>= (macaddr,macaddr)
</literal></entry></row>
459 <entry valign=
"middle"><literal>macaddr8_bloom_ops
</literal></entry>
460 <entry><literal>= (macaddr8,macaddr8)
</literal></entry>
464 <entry valign=
"middle" morerows=
"4"><literal>macaddr8_minmax_ops
</literal></entry>
465 <entry><literal>= (macaddr8,macaddr8)
</literal></entry>
467 <row><entry><literal>< (macaddr8,macaddr8)
</literal></entry></row>
468 <row><entry><literal><= (macaddr8,macaddr8)
</literal></entry></row>
469 <row><entry><literal>> (macaddr8,macaddr8)
</literal></entry></row>
470 <row><entry><literal>>= (macaddr8,macaddr8)
</literal></entry></row>
473 <entry valign=
"middle" morerows=
"4"><literal>macaddr8_minmax_multi_ops
</literal></entry>
474 <entry><literal>= (macaddr8,macaddr8)
</literal></entry>
476 <row><entry><literal>< (macaddr8,macaddr8)
</literal></entry></row>
477 <row><entry><literal><= (macaddr8,macaddr8)
</literal></entry></row>
478 <row><entry><literal>> (macaddr8,macaddr8)
</literal></entry></row>
479 <row><entry><literal>>= (macaddr8,macaddr8)
</literal></entry></row>
482 <entry valign=
"middle"><literal>name_bloom_ops
</literal></entry>
483 <entry><literal>= (name,name)
</literal></entry>
487 <entry valign=
"middle" morerows=
"4"><literal>name_minmax_ops
</literal></entry>
488 <entry><literal>= (name,name)
</literal></entry>
490 <row><entry><literal>< (name,name)
</literal></entry></row>
491 <row><entry><literal><= (name,name)
</literal></entry></row>
492 <row><entry><literal>> (name,name)
</literal></entry></row>
493 <row><entry><literal>>= (name,name)
</literal></entry></row>
496 <entry valign=
"middle"><literal>numeric_bloom_ops
</literal></entry>
497 <entry><literal>= (numeric,numeric)
</literal></entry>
501 <entry valign=
"middle" morerows=
"4"><literal>numeric_minmax_ops
</literal></entry>
502 <entry><literal>= (numeric,numeric)
</literal></entry>
504 <row><entry><literal>< (numeric,numeric)
</literal></entry></row>
505 <row><entry><literal><= (numeric,numeric)
</literal></entry></row>
506 <row><entry><literal>> (numeric,numeric)
</literal></entry></row>
507 <row><entry><literal>>= (numeric,numeric)
</literal></entry></row>
510 <entry valign=
"middle" morerows=
"4"><literal>numeric_minmax_multi_ops
</literal></entry>
511 <entry><literal>= (numeric,numeric)
</literal></entry>
513 <row><entry><literal>< (numeric,numeric)
</literal></entry></row>
514 <row><entry><literal><= (numeric,numeric)
</literal></entry></row>
515 <row><entry><literal>> (numeric,numeric)
</literal></entry></row>
516 <row><entry><literal>>= (numeric,numeric)
</literal></entry></row>
519 <entry valign=
"middle"><literal>oid_bloom_ops
</literal></entry>
520 <entry><literal>= (oid,oid)
</literal></entry>
524 <entry valign=
"middle" morerows=
"4"><literal>oid_minmax_ops
</literal></entry>
525 <entry><literal>= (oid,oid)
</literal></entry>
527 <row><entry><literal>< (oid,oid)
</literal></entry></row>
528 <row><entry><literal>> (oid,oid)
</literal></entry></row>
529 <row><entry><literal><= (oid,oid)
</literal></entry></row>
530 <row><entry><literal>>= (oid,oid)
</literal></entry></row>
533 <entry valign=
"middle" morerows=
"4"><literal>oid_minmax_multi_ops
</literal></entry>
534 <entry><literal>= (oid,oid)
</literal></entry>
536 <row><entry><literal>< (oid,oid)
</literal></entry></row>
537 <row><entry><literal>> (oid,oid)
</literal></entry></row>
538 <row><entry><literal><= (oid,oid)
</literal></entry></row>
539 <row><entry><literal>>= (oid,oid)
</literal></entry></row>
542 <entry valign=
"middle"><literal>pg_lsn_bloom_ops
</literal></entry>
543 <entry><literal>= (pg_lsn,pg_lsn)
</literal></entry>
547 <entry valign=
"middle" morerows=
"4"><literal>pg_lsn_minmax_ops
</literal></entry>
548 <entry><literal>= (pg_lsn,pg_lsn)
</literal></entry>
550 <row><entry><literal>< (pg_lsn,pg_lsn)
</literal></entry></row>
551 <row><entry><literal>> (pg_lsn,pg_lsn)
</literal></entry></row>
552 <row><entry><literal><= (pg_lsn,pg_lsn)
</literal></entry></row>
553 <row><entry><literal>>= (pg_lsn,pg_lsn)
</literal></entry></row>
556 <entry valign=
"middle" morerows=
"4"><literal>pg_lsn_minmax_multi_ops
</literal></entry>
557 <entry><literal>= (pg_lsn,pg_lsn)
</literal></entry>
559 <row><entry><literal>< (pg_lsn,pg_lsn)
</literal></entry></row>
560 <row><entry><literal>> (pg_lsn,pg_lsn)
</literal></entry></row>
561 <row><entry><literal><= (pg_lsn,pg_lsn)
</literal></entry></row>
562 <row><entry><literal>>= (pg_lsn,pg_lsn)
</literal></entry></row>
565 <entry valign=
"middle" morerows=
"13"><literal>range_inclusion_ops
</literal></entry>
566 <entry><literal>= (anyrange,anyrange)
</literal></entry>
568 <row><entry><literal>< (anyrange,anyrange)
</literal></entry></row>
569 <row><entry><literal><= (anyrange,anyrange)
</literal></entry></row>
570 <row><entry><literal>>= (anyrange,anyrange)
</literal></entry></row>
571 <row><entry><literal>> (anyrange,anyrange)
</literal></entry></row>
572 <row><entry><literal>&& (anyrange,anyrange)
</literal></entry></row>
573 <row><entry><literal>@
> (anyrange,anyelement)
</literal></entry></row>
574 <row><entry><literal>@
> (anyrange,anyrange)
</literal></entry></row>
575 <row><entry><literal><@ (anyrange,anyrange)
</literal></entry></row>
576 <row><entry><literal><< (anyrange,anyrange)
</literal></entry></row>
577 <row><entry><literal>>> (anyrange,anyrange)
</literal></entry></row>
578 <row><entry><literal>&< (anyrange,anyrange)
</literal></entry></row>
579 <row><entry><literal>&> (anyrange,anyrange)
</literal></entry></row>
580 <row><entry><literal>-|- (anyrange,anyrange)
</literal></entry></row>
583 <entry valign=
"middle"><literal>text_bloom_ops
</literal></entry>
584 <entry><literal>= (text,text)
</literal></entry>
588 <entry valign=
"middle" morerows=
"4"><literal>text_minmax_ops
</literal></entry>
589 <entry><literal>= (text,text)
</literal></entry>
591 <row><entry><literal>< (text,text)
</literal></entry></row>
592 <row><entry><literal><= (text,text)
</literal></entry></row>
593 <row><entry><literal>> (text,text)
</literal></entry></row>
594 <row><entry><literal>>= (text,text)
</literal></entry></row>
597 <entry valign=
"middle"><literal>tid_bloom_ops
</literal></entry>
598 <entry><literal>= (tid,tid)
</literal></entry>
602 <entry valign=
"middle" morerows=
"4"><literal>tid_minmax_ops
</literal></entry>
603 <entry><literal>= (tid,tid)
</literal></entry>
605 <row><entry><literal>< (tid,tid)
</literal></entry></row>
606 <row><entry><literal>> (tid,tid)
</literal></entry></row>
607 <row><entry><literal><= (tid,tid)
</literal></entry></row>
608 <row><entry><literal>>= (tid,tid)
</literal></entry></row>
611 <entry valign=
"middle" morerows=
"4"><literal>tid_minmax_multi_ops
</literal></entry>
612 <entry><literal>= (tid,tid)
</literal></entry>
614 <row><entry><literal>< (tid,tid)
</literal></entry></row>
615 <row><entry><literal>> (tid,tid)
</literal></entry></row>
616 <row><entry><literal><= (tid,tid)
</literal></entry></row>
617 <row><entry><literal>>= (tid,tid)
</literal></entry></row>
620 <entry valign=
"middle"><literal>timestamp_bloom_ops
</literal></entry>
621 <entry><literal>= (timestamp,timestamp)
</literal></entry>
625 <entry valign=
"middle" morerows=
"4"><literal>timestamp_minmax_ops
</literal></entry>
626 <entry><literal>= (timestamp,timestamp)
</literal></entry>
628 <row><entry><literal>< (timestamp,timestamp)
</literal></entry></row>
629 <row><entry><literal><= (timestamp,timestamp)
</literal></entry></row>
630 <row><entry><literal>> (timestamp,timestamp)
</literal></entry></row>
631 <row><entry><literal>>= (timestamp,timestamp)
</literal></entry></row>
634 <entry valign=
"middle" morerows=
"4"><literal>timestamp_minmax_multi_ops
</literal></entry>
635 <entry><literal>= (timestamp,timestamp)
</literal></entry>
637 <row><entry><literal>< (timestamp,timestamp)
</literal></entry></row>
638 <row><entry><literal><= (timestamp,timestamp)
</literal></entry></row>
639 <row><entry><literal>> (timestamp,timestamp)
</literal></entry></row>
640 <row><entry><literal>>= (timestamp,timestamp)
</literal></entry></row>
643 <entry valign=
"middle"><literal>timestamptz_bloom_ops
</literal></entry>
644 <entry><literal>= (timestamptz,timestamptz)
</literal></entry>
648 <entry valign=
"middle" morerows=
"4"><literal>timestamptz_minmax_ops
</literal></entry>
649 <entry><literal>= (timestamptz,timestamptz)
</literal></entry>
651 <row><entry><literal>< (timestamptz,timestamptz)
</literal></entry></row>
652 <row><entry><literal><= (timestamptz,timestamptz)
</literal></entry></row>
653 <row><entry><literal>> (timestamptz,timestamptz)
</literal></entry></row>
654 <row><entry><literal>>= (timestamptz,timestamptz)
</literal></entry></row>
657 <entry valign=
"middle" morerows=
"4"><literal>timestamptz_minmax_multi_ops
</literal></entry>
658 <entry><literal>= (timestamptz,timestamptz)
</literal></entry>
660 <row><entry><literal>< (timestamptz,timestamptz)
</literal></entry></row>
661 <row><entry><literal><= (timestamptz,timestamptz)
</literal></entry></row>
662 <row><entry><literal>> (timestamptz,timestamptz)
</literal></entry></row>
663 <row><entry><literal>>= (timestamptz,timestamptz)
</literal></entry></row>
666 <entry valign=
"middle"><literal>time_bloom_ops
</literal></entry>
667 <entry><literal>= (time,time)
</literal></entry>
671 <entry valign=
"middle" morerows=
"4"><literal>time_minmax_ops
</literal></entry>
672 <entry><literal>= (time,time)
</literal></entry>
674 <row><entry><literal>< (time,time)
</literal></entry></row>
675 <row><entry><literal><= (time,time)
</literal></entry></row>
676 <row><entry><literal>> (time,time)
</literal></entry></row>
677 <row><entry><literal>>= (time,time)
</literal></entry></row>
680 <entry valign=
"middle" morerows=
"4"><literal>time_minmax_multi_ops
</literal></entry>
681 <entry><literal>= (time,time)
</literal></entry>
683 <row><entry><literal>< (time,time)
</literal></entry></row>
684 <row><entry><literal><= (time,time)
</literal></entry></row>
685 <row><entry><literal>> (time,time)
</literal></entry></row>
686 <row><entry><literal>>= (time,time)
</literal></entry></row>
689 <entry valign=
"middle"><literal>timetz_bloom_ops
</literal></entry>
690 <entry><literal>= (timetz,timetz)
</literal></entry>
694 <entry valign=
"middle" morerows=
"4"><literal>timetz_minmax_ops
</literal></entry>
695 <entry><literal>= (timetz,timetz)
</literal></entry>
697 <row><entry><literal>< (timetz,timetz)
</literal></entry></row>
698 <row><entry><literal><= (timetz,timetz)
</literal></entry></row>
699 <row><entry><literal>> (timetz,timetz)
</literal></entry></row>
700 <row><entry><literal>>= (timetz,timetz)
</literal></entry></row>
703 <entry valign=
"middle" morerows=
"4"><literal>timetz_minmax_multi_ops
</literal></entry>
704 <entry><literal>= (timetz,timetz)
</literal></entry>
706 <row><entry><literal>< (timetz,timetz)
</literal></entry></row>
707 <row><entry><literal><= (timetz,timetz)
</literal></entry></row>
708 <row><entry><literal>> (timetz,timetz)
</literal></entry></row>
709 <row><entry><literal>>= (timetz,timetz)
</literal></entry></row>
712 <entry valign=
"middle"><literal>uuid_bloom_ops
</literal></entry>
713 <entry><literal>= (uuid,uuid)
</literal></entry>
717 <entry valign=
"middle" morerows=
"4"><literal>uuid_minmax_ops
</literal></entry>
718 <entry><literal>= (uuid,uuid)
</literal></entry>
720 <row><entry><literal>< (uuid,uuid)
</literal></entry></row>
721 <row><entry><literal>> (uuid,uuid)
</literal></entry></row>
722 <row><entry><literal><= (uuid,uuid)
</literal></entry></row>
723 <row><entry><literal>>= (uuid,uuid)
</literal></entry></row>
726 <entry valign=
"middle" morerows=
"4"><literal>uuid_minmax_multi_ops
</literal></entry>
727 <entry><literal>= (uuid,uuid)
</literal></entry>
729 <row><entry><literal>< (uuid,uuid)
</literal></entry></row>
730 <row><entry><literal>> (uuid,uuid)
</literal></entry></row>
731 <row><entry><literal><= (uuid,uuid)
</literal></entry></row>
732 <row><entry><literal>>= (uuid,uuid)
</literal></entry></row>
735 <entry valign=
"middle" morerows=
"4"><literal>varbit_minmax_ops
</literal></entry>
736 <entry><literal>= (varbit,varbit)
</literal></entry>
738 <row><entry><literal>< (varbit,varbit)
</literal></entry></row>
739 <row><entry><literal>> (varbit,varbit)
</literal></entry></row>
740 <row><entry><literal><= (varbit,varbit)
</literal></entry></row>
741 <row><entry><literal>>= (varbit,varbit)
</literal></entry></row>
746 <sect3 id=
"brin-builtin-opclasses--parameters">
747 <title>Operator Class Parameters
</title>
750 Some of the built-in operator classes allow specifying parameters affecting
751 behavior of the operator class. Each operator class has its own set of
752 allowed parameters. Only the
<literal>bloom
</literal> and
<literal>minmax-multi
</literal>
753 operator classes allow specifying parameters:
757 bloom operator classes accept these parameters:
762 <term><literal>n_distinct_per_range
</literal></term>
765 Defines the estimated number of distinct non-null values in the block
766 range, used by
<acronym>BRIN
</acronym> bloom indexes for sizing of the
767 Bloom filter. It behaves similarly to
<literal>n_distinct
</literal> option
768 for
<xref linkend=
"sql-altertable"/>. When set to a positive value,
769 each block range is assumed to contain this number of distinct non-null
770 values. When set to a negative value, which must be greater than or
771 equal to -
1, the number of distinct non-null values is assumed to grow linearly with
772 the maximum possible number of tuples in the block range (about
290
773 rows per block). The default value is
<literal>-
0.1</literal>, and
774 the minimum number of distinct non-null values is
<literal>16</literal>.
780 <term><literal>false_positive_rate
</literal></term>
783 Defines the desired false positive rate used by
<acronym>BRIN
</acronym>
784 bloom indexes for sizing of the Bloom filter. The values must be
785 between
0.0001 and
0.25. The default value is
0.01, which is
1% false
794 minmax-multi operator classes accept these parameters:
799 <term><literal>values_per_range
</literal></term>
802 Defines the maximum number of values stored by
<acronym>BRIN
</acronym>
803 minmax indexes to summarize a block range. Each value may represent
804 either a point, or a boundary of an interval. Values must be between
805 8 and
256, and the default value is
32.
815 <sect2 id=
"brin-extensibility">
816 <title>Extensibility
</title>
819 The
<acronym>BRIN
</acronym> interface has a high level of abstraction,
820 requiring the access method implementer only to implement the semantics
821 of the data type being accessed. The
<acronym>BRIN
</acronym> layer
822 itself takes care of concurrency, logging and searching the index structure.
826 All it takes to get a
<acronym>BRIN
</acronym> access method working is to
827 implement a few user-defined methods, which define the behavior of
828 summary values stored in the index and the way they interact with
830 In short,
<acronym>BRIN
</acronym> combines
831 extensibility with generality, code reuse, and a clean interface.
835 There are four methods that an operator class for
<acronym>BRIN
</acronym>
840 <term><function>BrinOpcInfo *opcInfo(Oid type_oid)
</function></term>
843 Returns internal information about the indexed columns' summary data.
844 The return value must point to a palloc'd
<structname>BrinOpcInfo
</structname>,
845 which has this definition:
847 typedef struct BrinOpcInfo
849 /* Number of columns stored in an index column of this opclass */
852 /* Opaque pointer for the opclass' private use */
855 /* Type cache entries of the stored columns */
856 TypeCacheEntry *oi_typcache[FLEXIBLE_ARRAY_MEMBER];
859 <structname>BrinOpcInfo
</structname>.
<structfield>oi_opaque
</structfield> can be used by the
860 operator class routines to pass information between support functions
861 during an index scan.
867 <term><function>bool consistent(BrinDesc *bdesc, BrinValues *column,
868 ScanKey *keys, int nkeys)
</function></term>
871 Returns whether all the ScanKey entries are consistent with the given
872 indexed values for a range.
873 The attribute number to use is passed as part of the scan key.
874 Multiple scan keys for the same attribute may be passed at once; the
875 number of entries is determined by the
<literal>nkeys
</literal> parameter.
881 <term><function>bool consistent(BrinDesc *bdesc, BrinValues *column,
882 ScanKey key)
</function></term>
885 Returns whether the ScanKey is consistent with the given indexed
887 The attribute number to use is passed as part of the scan key.
888 This is an older backward-compatible variant of the consistent function.
894 <term><function>bool addValue(BrinDesc *bdesc, BrinValues *column,
895 Datum newval, bool isnull)
</function></term>
898 Given an index tuple and an indexed value, modifies the indicated
899 attribute of the tuple so that it additionally represents the new value.
900 If any modification was done to the tuple,
<literal>true
</literal> is
907 <term><function>bool unionTuples(BrinDesc *bdesc, BrinValues *a,
908 BrinValues *b)
</function></term>
911 Consolidates two index tuples. Given two index tuples, modifies the
912 indicated attribute of the first of them so that it represents both tuples.
913 The second tuple is not modified.
919 An operator class for
<acronym>BRIN
</acronym> can optionally specify the
924 <term><function>void options(local_relopts *relopts)
</function></term>
927 Defines a set of user-visible parameters that control operator class
932 The
<function>options
</function> function is passed a pointer to a
933 <structname>local_relopts
</structname> struct, which needs to be
934 filled with a set of operator class specific options. The options
935 can be accessed from other support functions using the
936 <literal>PG_HAS_OPCLASS_OPTIONS()
</literal> and
937 <literal>PG_GET_OPCLASS_OPTIONS()
</literal> macros.
941 Since both key extraction of indexed values and representation of the
942 key in
<acronym>BRIN
</acronym> are flexible, they may depend on
943 user-specified parameters.
949 The core distribution includes support for four types of operator classes:
950 minmax, minmax-multi, inclusion and bloom. Operator class definitions
951 using them are shipped for in-core data types as appropriate. Additional
952 operator classes can be defined by the user for other data types using
953 equivalent definitions, without having to write any source code;
954 appropriate catalog entries being declared is enough. Note that
955 assumptions about the semantics of operator strategies are embedded in the
956 support functions' source code.
960 Operator classes that implement completely different semantics are also
961 possible, provided implementations of the four main support functions
962 described above are written. Note that backwards compatibility across major
963 releases is not guaranteed: for example, additional support functions might
964 be required in later releases.
968 To write an operator class for a data type that implements a totally
969 ordered set, it is possible to use the minmax support functions
970 alongside the corresponding operators, as shown in
971 <xref linkend=
"brin-extensibility-minmax-table"/>.
972 All operator class members (functions and operators) are mandatory.
975 <table id=
"brin-extensibility-minmax-table">
976 <title>Function and Support Numbers for Minmax Operator Classes
</title>
978 <colspec colname=
"col1" colwidth=
"1*"/>
979 <colspec colname=
"col2" colwidth=
"2*"/>
982 <entry>Operator class member
</entry>
983 <entry>Object
</entry>
988 <entry>Support Function
1</entry>
989 <entry>internal function
<function>brin_minmax_opcinfo()
</function></entry>
992 <entry>Support Function
2</entry>
993 <entry>internal function
<function>brin_minmax_add_value()
</function></entry>
996 <entry>Support Function
3</entry>
997 <entry>internal function
<function>brin_minmax_consistent()
</function></entry>
1000 <entry>Support Function
4</entry>
1001 <entry>internal function
<function>brin_minmax_union()
</function></entry>
1004 <entry>Operator Strategy
1</entry>
1005 <entry>operator less-than
</entry>
1008 <entry>Operator Strategy
2</entry>
1009 <entry>operator less-than-or-equal-to
</entry>
1012 <entry>Operator Strategy
3</entry>
1013 <entry>operator equal-to
</entry>
1016 <entry>Operator Strategy
4</entry>
1017 <entry>operator greater-than-or-equal-to
</entry>
1020 <entry>Operator Strategy
5</entry>
1021 <entry>operator greater-than
</entry>
1028 To write an operator class for a complex data type which has values
1029 included within another type, it's possible to use the inclusion support
1030 functions alongside the corresponding operators, as shown
1031 in
<xref linkend=
"brin-extensibility-inclusion-table"/>. It requires
1032 only a single additional function, which can be written in any language.
1033 More functions can be defined for additional functionality. All operators
1034 are optional. Some operators require other operators, as shown as
1035 dependencies on the table.
1038 <table id=
"brin-extensibility-inclusion-table">
1039 <title>Function and Support Numbers for Inclusion Operator Classes
</title>
1041 <colspec colname=
"col1" colwidth=
"1*"/>
1042 <colspec colname=
"col2" colwidth=
"2*"/>
1043 <colspec colname=
"col3" colwidth=
"1*"/>
1046 <entry>Operator class member
</entry>
1047 <entry>Object
</entry>
1048 <entry>Dependency
</entry>
1053 <entry>Support Function
1</entry>
1054 <entry>internal function
<function>brin_inclusion_opcinfo()
</function></entry>
1058 <entry>Support Function
2</entry>
1059 <entry>internal function
<function>brin_inclusion_add_value()
</function></entry>
1063 <entry>Support Function
3</entry>
1064 <entry>internal function
<function>brin_inclusion_consistent()
</function></entry>
1068 <entry>Support Function
4</entry>
1069 <entry>internal function
<function>brin_inclusion_union()
</function></entry>
1073 <entry>Support Function
11</entry>
1074 <entry>function to merge two elements
</entry>
1078 <entry>Support Function
12</entry>
1079 <entry>optional function to check whether two elements are mergeable
</entry>
1083 <entry>Support Function
13</entry>
1084 <entry>optional function to check if an element is contained within another
</entry>
1088 <entry>Support Function
14</entry>
1089 <entry>optional function to check whether an element is empty
</entry>
1093 <entry>Operator Strategy
1</entry>
1094 <entry>operator left-of
</entry>
1095 <entry>Operator Strategy
4</entry>
1098 <entry>Operator Strategy
2</entry>
1099 <entry>operator does-not-extend-to-the-right-of
</entry>
1100 <entry>Operator Strategy
5</entry>
1103 <entry>Operator Strategy
3</entry>
1104 <entry>operator overlaps
</entry>
1108 <entry>Operator Strategy
4</entry>
1109 <entry>operator does-not-extend-to-the-left-of
</entry>
1110 <entry>Operator Strategy
1</entry>
1113 <entry>Operator Strategy
5</entry>
1114 <entry>operator right-of
</entry>
1115 <entry>Operator Strategy
2</entry>
1118 <entry>Operator Strategy
6,
18</entry>
1119 <entry>operator same-as-or-equal-to
</entry>
1120 <entry>Operator Strategy
7</entry>
1123 <entry>Operator Strategy
7,
16,
24,
25</entry>
1124 <entry>operator contains-or-equal-to
</entry>
1128 <entry>Operator Strategy
8,
26,
27</entry>
1129 <entry>operator is-contained-by-or-equal-to
</entry>
1130 <entry>Operator Strategy
3</entry>
1133 <entry>Operator Strategy
9</entry>
1134 <entry>operator does-not-extend-above
</entry>
1135 <entry>Operator Strategy
11</entry>
1138 <entry>Operator Strategy
10</entry>
1139 <entry>operator is-below
</entry>
1140 <entry>Operator Strategy
12</entry>
1143 <entry>Operator Strategy
11</entry>
1144 <entry>operator is-above
</entry>
1145 <entry>Operator Strategy
9</entry>
1148 <entry>Operator Strategy
12</entry>
1149 <entry>operator does-not-extend-below
</entry>
1150 <entry>Operator Strategy
10</entry>
1153 <entry>Operator Strategy
20</entry>
1154 <entry>operator less-than
</entry>
1155 <entry>Operator Strategy
5</entry>
1158 <entry>Operator Strategy
21</entry>
1159 <entry>operator less-than-or-equal-to
</entry>
1160 <entry>Operator Strategy
5</entry>
1163 <entry>Operator Strategy
22</entry>
1164 <entry>operator greater-than
</entry>
1165 <entry>Operator Strategy
1</entry>
1168 <entry>Operator Strategy
23</entry>
1169 <entry>operator greater-than-or-equal-to
</entry>
1170 <entry>Operator Strategy
1</entry>
1177 Support function numbers
1 through
10 are reserved for the BRIN internal
1178 functions, so the SQL level functions start with number
11. Support
1179 function number
11 is the main function required to build the index.
1180 It should accept two arguments with the same data type as the operator class,
1181 and return the union of them. The inclusion operator class can store union
1182 values with different data types if it is defined with the
1183 <literal>STORAGE
</literal> parameter. The return value of the union
1184 function should match the
<literal>STORAGE
</literal> data type.
1188 Support function numbers
12 and
14 are provided to support
1189 irregularities of built-in data types. Function number
12
1190 is used to support network addresses from different families which
1191 are not mergeable. Function number
14 is used to support
1192 empty ranges. Function number
13 is an optional but
1193 recommended one, which allows the new value to be checked before
1194 it is passed to the union function. As the BRIN framework can shortcut
1195 some operations when the union is not changed, using this
1196 function can improve index performance.
1200 To write an operator class for a data type that implements only an equality
1201 operator and supports hashing, it is possible to use the bloom support procedures
1202 alongside the corresponding operators, as shown in
1203 <xref linkend=
"brin-extensibility-bloom-table"/>.
1204 All operator class members (procedures and operators) are mandatory.
1207 <table id=
"brin-extensibility-bloom-table">
1208 <title>Procedure and Support Numbers for Bloom Operator Classes
</title>
1212 <entry>Operator class member
</entry>
1213 <entry>Object
</entry>
1218 <entry>Support Procedure
1</entry>
1219 <entry>internal function
<function>brin_bloom_opcinfo()
</function></entry>
1222 <entry>Support Procedure
2</entry>
1223 <entry>internal function
<function>brin_bloom_add_value()
</function></entry>
1226 <entry>Support Procedure
3</entry>
1227 <entry>internal function
<function>brin_bloom_consistent()
</function></entry>
1230 <entry>Support Procedure
4</entry>
1231 <entry>internal function
<function>brin_bloom_union()
</function></entry>
1234 <entry>Support Procedure
5</entry>
1235 <entry>internal function
<function>brin_bloom_options()
</function></entry>
1238 <entry>Support Procedure
11</entry>
1239 <entry>function to compute hash of an element
</entry>
1242 <entry>Operator Strategy
1</entry>
1243 <entry>operator equal-to
</entry>
1250 Support procedure numbers
1-
10 are reserved for the BRIN internal
1251 functions, so the SQL level functions start with number
11. Support
1252 function number
11 is the main function required to build the index.
1253 It should accept one argument with the same data type as the operator class,
1254 and return a hash of the value.
1258 The minmax-multi operator class is also intended for data types implementing
1259 a totally ordered set, and may be seen as a simple extension of the minmax
1260 operator class. While minmax operator class summarizes values from each block
1261 range into a single contiguous interval, minmax-multi allows summarization
1262 into multiple smaller intervals to improve handling of outlier values.
1263 It is possible to use the minmax-multi support procedures alongside the
1264 corresponding operators, as shown in
1265 <xref linkend=
"brin-extensibility-minmax-multi-table"/>.
1266 All operator class members (procedures and operators) are mandatory.
1269 <table id=
"brin-extensibility-minmax-multi-table">
1270 <title>Procedure and Support Numbers for minmax-multi Operator Classes
</title>
1274 <entry>Operator class member
</entry>
1275 <entry>Object
</entry>
1280 <entry>Support Procedure
1</entry>
1281 <entry>internal function
<function>brin_minmax_multi_opcinfo()
</function></entry>
1284 <entry>Support Procedure
2</entry>
1285 <entry>internal function
<function>brin_minmax_multi_add_value()
</function></entry>
1288 <entry>Support Procedure
3</entry>
1289 <entry>internal function
<function>brin_minmax_multi_consistent()
</function></entry>
1292 <entry>Support Procedure
4</entry>
1293 <entry>internal function
<function>brin_minmax_multi_union()
</function></entry>
1296 <entry>Support Procedure
5</entry>
1297 <entry>internal function
<function>brin_minmax_multi_options()
</function></entry>
1300 <entry>Support Procedure
11</entry>
1301 <entry>function to compute distance between two values (length of a range)
</entry>
1304 <entry>Operator Strategy
1</entry>
1305 <entry>operator less-than
</entry>
1308 <entry>Operator Strategy
2</entry>
1309 <entry>operator less-than-or-equal-to
</entry>
1312 <entry>Operator Strategy
3</entry>
1313 <entry>operator equal-to
</entry>
1316 <entry>Operator Strategy
4</entry>
1317 <entry>operator greater-than-or-equal-to
</entry>
1320 <entry>Operator Strategy
5</entry>
1321 <entry>operator greater-than
</entry>
1328 Both minmax and inclusion operator classes support cross-data-type
1329 operators, though with these the dependencies become more complicated.
1330 The minmax operator class requires a full set of operators to be
1331 defined with both arguments having the same data type. It allows
1332 additional data types to be supported by defining extra sets
1333 of operators. Inclusion operator class operator strategies are dependent
1334 on another operator strategy as shown in
1335 <xref linkend=
"brin-extensibility-inclusion-table"/>, or the same
1336 operator strategy as themselves. They require the dependency
1337 operator to be defined with the
<literal>STORAGE
</literal> data type as the
1338 left-hand-side argument and the other supported data type to be the
1339 right-hand-side argument of the supported operator. See
1340 <literal>float4_minmax_ops
</literal> as an example of minmax, and
1341 <literal>box_inclusion_ops
</literal> as an example of inclusion.