63.2. Встроенные классы операторов

В базовый дистрибутив PostgreSQL включены классы операторов GIN, перечисленные в Таблице 63.1. (Некоторые дополнительные модули, описанные в Приложении F, добавляют другие классы операторов GIN.)

Таблица 63.1. Встроенные классы операторов GIN

ИмяИндексируемый тип данныхИндексируемые операторы
_abstime_opsabstime[]&& <@ = @>
_bit_opsbit[]&& <@ = @>
_bool_opsboolean[]&& <@ = @>
_bpchar_opscharacter[]&& <@ = @>
_bytea_opsbytea[]&& <@ = @>
_char_ops"char"[]&& <@ = @>
_cidr_opscidr[]&& <@ = @>
_date_opsdate[]&& <@ = @>
_float4_opsfloat4[]&& <@ = @>
_float8_opsfloat8[]&& <@ = @>
_inet_opsinet[]&& <@ = @>
_int2_opssmallint[]&& <@ = @>
_int4_opsinteger[]&& <@ = @>
_int8_opsbigint[]&& <@ = @>
_interval_opsinterval[]&& <@ = @>
_macaddr_opsmacaddr[]&& <@ = @>
_money_opsmoney[]&& <@ = @>
_name_opsname[]&& <@ = @>
_numeric_opsnumeric[]&& <@ = @>
_oid_opsoid[]&& <@ = @>
_oidvector_opsoidvector[]&& <@ = @>
_reltime_opsreltime[]&& <@ = @>
_text_opstext[]&& <@ = @>
_time_opstime[]&& <@ = @>
_timestamp_opstimestamp[]&& <@ = @>
_timestamptz_opstimestamp with time zone[]&& <@ = @>
_timetz_opstime with time zone[]&& <@ = @>
_tinterval_opstinterval[]&& <@ = @>
_varbit_opsbit varying[]&& <@ = @>
_varchar_opscharacter varying[]&& <@ = @>
jsonb_opsjsonb? ?& ?| @>
jsonb_path_opsjsonb@>
tsvector_opstsvector@@ @@@

Из двух классов операторов для типа jsonb классом по умолчанию является jsonb_ops. Класс jsonb_path_ops поддерживает меньше операторов, но обеспечивает для них большую производительность. За подробностями обратитесь к Подразделу 8.14.4.

51.5. pg_amproc #

The catalog pg_amproc stores information about support functions associated with access method operator families. There is one row for each support function belonging to an operator family.

Table 51.5. pg_amproc Columns

Column Type

Description

oid oid

Row identifier

amprocfamily oid (references pg_opfamily.oid)

The operator family this entry is for

amproclefttype oid (references pg_type.oid)

Left-hand input data type of associated operator

amprocrighttype oid (references pg_type.oid)

Right-hand input data type of associated operator

amprocnum int2

Support function number

amproc regproc (references pg_proc.oid)

OID of the function


The usual interpretation of the amproclefttype and amprocrighttype fields is that they identify the left and right input types of the operator(s) that a particular support function supports. For some access methods these match the input data type(s) of the support function itself, for others not. There is a notion of default support functions for an index, which are those with amproclefttype and amprocrighttype both equal to the index operator class's opcintype.