↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Operator Families / BRIN classes

brin/range_inclusion_ops (class)

BRIN operator class for anyrange; member of range_inclusion_ops.

Reading PostgreSQL 18.6.

Description

BRIN operator class for anyrange; member of range_inclusion_ops.

Object kind
Operator class
Index AM
BRIN
Input type
anyrange
Stored key type
anyrange
Default class
yes

Usage

brin/range_inclusion_ops

Operator classes and families

An index definition can specify an operator class for each column of an index.

The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).

There are also some built-in operator classes besides the default ones:

Family operator strategies

Operator overloadStrategyPurposeOrdering familyMembership scopeSource description
<<(anyrange,anyrange)1searchClass input pairis left of
&<(anyrange,anyrange)2searchClass input pairoverlaps or is left of
&&(anyrange,anyrange)3searchClass input pairoverlaps
&>(anyrange,anyrange)4searchClass input pairoverlaps or is right of
>>(anyrange,anyrange)5searchClass input pairis right of
@>(anyrange,anyrange)7searchClass input paircontains
<@(anyrange,anyrange)8searchClass input pairis contained by
@>(anyrange,anyelement)16searchFamily membercontains
-|-(anyrange,anyrange)17searchClass input pairis adjacent to
=(anyrange,anyrange)18searchClass input pairequal
<(anyrange,anyrange)20searchClass input pairless than
<=(anyrange,anyrange)21searchClass input pairless than or equal
>(anyrange,anyrange)22searchClass input pairgreater than
>=(anyrange,anyrange)23searchClass input pairgreater than or equal

Family support functions

Support numberLeft typeRight typeFunction signatureResult type
1anyrangeanyrangebrin_inclusion_opcinfo(internal)internal
2anyrangeanyrangebrin_inclusion_add_value(internal,internal,internal,internal)bool
3anyrangeanyrangebrin_inclusion_consistent(internal,internal,internal)bool
4anyrangeanyrangebrin_inclusion_union(internal,internal,internal)bool
11anyrangeanyrangerange_merge(anyrange,anyrange)anyrange
13anyrangeanyrangerange_contains(anyrange,anyrange)bool
14anyrangeanyrangeisempty(anyrange)bool

Classes in this family

ClassInput typeKey typeDefault
range_inclusion_opsanyrangeanyrangeyes

Related entries

Documentation and source

Source build
Version
18.6
Build
https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
Source fingerprint
555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f

Compare versions

PostgreSQL 17 → 18: unchanged.

Compares recorded interfaces and attributes. Source fingerprints and build metadata are excluded; an absent sample is not proof of the introduction or removal release.

Related entries

Export JSON · Back to Operator Families · Recorded in PostgreSQL 10 through 20; the first sample is not necessarily its introduction.