]> begriffs open source - ai-pg/blob - full-docs/man7/CREATE_OPERATOR_FAMILY.7
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man7 / CREATE_OPERATOR_FAMILY.7
1 '\" t
2 .\"     Title: CREATE OPERATOR FAMILY
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "CREATE OPERATOR FAMILY" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 CREATE_OPERATOR_FAMILY \- define a new operator family
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 CREATE OPERATOR FAMILY \fIname\fR USING \fIindex_method\fR
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBCREATE OPERATOR FAMILY\fR
40 creates a new operator family\&. An operator family defines a collection of related operator classes, and perhaps some additional operators and support functions that are compatible with these operator classes but not essential for the functioning of any individual index\&. (Operators and functions that are essential to indexes should be grouped within the relevant operator class, rather than being
41 \(lqloose\(rq
42 in the operator family\&. Typically, single\-data\-type operators are bound to operator classes, while cross\-data\-type operators can be loose in an operator family containing operator classes for both data types\&.)
43 .PP
44 The new operator family is initially empty\&. It should be populated by issuing subsequent
45 \fBCREATE OPERATOR CLASS\fR
46 commands to add contained operator classes, and optionally
47 \fBALTER OPERATOR FAMILY\fR
48 commands to add
49 \(lqloose\(rq
50 operators and their corresponding support functions\&.
51 .PP
52 If a schema name is given then the operator family is created in the specified schema\&. Otherwise it is created in the current schema\&. Two operator families in the same schema can have the same name only if they are for different index methods\&.
53 .PP
54 The user who defines an operator family becomes its owner\&. Presently, the creating user must be a superuser\&. (This restriction is made because an erroneous operator family definition could confuse or even crash the server\&.)
55 .PP
56 Refer to
57 Section\ \&36.16
58 for further information\&.
59 .SH "PARAMETERS"
60 .PP
61 \fIname\fR
62 .RS 4
63 The name of the operator family to be created\&. The name can be schema\-qualified\&.
64 .RE
65 .PP
66 \fIindex_method\fR
67 .RS 4
68 The name of the index method this operator family is for\&.
69 .RE
70 .SH "COMPATIBILITY"
71 .PP
72 \fBCREATE OPERATOR FAMILY\fR
73 is a
74 PostgreSQL
75 extension\&. There is no
76 \fBCREATE OPERATOR FAMILY\fR
77 statement in the SQL standard\&.
78 .SH "SEE ALSO"
79 ALTER OPERATOR FAMILY (\fBALTER_OPERATOR_FAMILY\fR(7)), DROP OPERATOR FAMILY (\fBDROP_OPERATOR_FAMILY\fR(7)), CREATE OPERATOR CLASS (\fBCREATE_OPERATOR_CLASS\fR(7)), ALTER OPERATOR CLASS (\fBALTER_OPERATOR_CLASS\fR(7)), DROP OPERATOR CLASS (\fBDROP_OPERATOR_CLASS\fR(7))