PostgreSQL Source Code git master
Loading...
Searching...
No Matches
pg_operator.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * pg_operator.h
4 * definition of the "operator" system catalog (pg_operator)
5 *
6 *
7 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
9 *
10 * src/include/catalog/pg_operator.h
11 *
12 * NOTES
13 * The Catalog.pm module reads this file and derives schema
14 * information.
15 *
16 *-------------------------------------------------------------------------
17 */
18#ifndef PG_OPERATOR_H
19#define PG_OPERATOR_H
20
21#include "catalog/genbki.h"
23#include "catalog/pg_operator_d.h" /* IWYU pragma: export */
24#include "nodes/pg_list.h"
25
26/* ----------------
27 * pg_operator definition. cpp turns this into
28 * typedef struct FormData_pg_operator
29 * ----------------
30 */
32
34{
35 Oid oid; /* oid */
36
37 /* name of operator */
38 NameData oprname;
39
40 /* OID of namespace containing this oper */
42
43 /* operator owner */
45
46 /* 'l' for prefix or 'b' for infix */
47 char oprkind BKI_DEFAULT(b);
48
49 /* can be used in merge join? */
51
52 /* can be used in hash join? */
53 bool oprcanhash BKI_DEFAULT(f);
54
55 /* left arg type, or 0 if prefix operator */
56 Oid oprleft BKI_LOOKUP_OPT(pg_type);
57
58 /* right arg type */
59 Oid oprright BKI_LOOKUP(pg_type);
60
61 /* result datatype; can be 0 in a "shell" operator */
63
64 /* OID of commutator oper, or 0 if none */
66
67 /* OID of negator oper, or 0 if none */
69
70 /* OID of underlying function; can be 0 in a "shell" operator */
72
73 /* OID of restriction estimator, or 0 */
75
76 /* OID of join estimator, or 0 */
79
81
82/* ----------------
83 * Form_pg_operator corresponds to a pointer to a tuple with
84 * the format of pg_operator relation.
85 * ----------------
86 */
88
91
94
98 bool *defined);
99
100extern ObjectAddress OperatorCreate(const char *operatorName,
108 Oid joinId,
109 bool canMerge,
110 bool canHash);
111
113 bool makeExtensionDep,
114 bool isUpdate);
115
119 bool hasCommutator,
120 bool hasNegator,
123 bool canMerge,
124 bool canHash);
125
126extern void OperatorUpd(Oid baseId, Oid commId, Oid negId, bool isDelete);
127
128#endif /* PG_OPERATOR_H */
Oid regproc
Definition c.h:675
#define BEGIN_CATALOG_STRUCT
Definition genbki.h:37
#define DECLARE_UNIQUE_INDEX_PKEY(name, oid, oidmacro, tblname, decl)
Definition genbki.h:105
#define BKI_LOOKUP(catalog)
Definition genbki.h:65
#define END_CATALOG_STRUCT
Definition genbki.h:38
#define BKI_DEFAULT(value)
Definition genbki.h:54
#define BKI_LOOKUP_OPT(catalog)
Definition genbki.h:66
#define DECLARE_UNIQUE_INDEX(name, oid, oidmacro, tblname, decl)
Definition genbki.h:104
#define CATALOG(name, oid, oidmacro)
Definition genbki.h:42
#define MAKE_SYSCACHE(name, idxname, nbuckets)
Definition genbki.h:146
int b
Definition isn.c:74
FormData_pg_operator
Definition pg_operator.h:78
ObjectAddress OperatorCreate(const char *operatorName, Oid operatorNamespace, Oid leftTypeId, Oid rightTypeId, Oid procedureId, List *commutatorName, List *negatorName, Oid restrictionId, Oid joinId, bool canMerge, bool canHash)
void OperatorValidateParams(Oid leftTypeId, Oid rightTypeId, Oid operResultType, bool hasCommutator, bool hasNegator, bool hasRestrictionSelectivity, bool hasJoinSelectivity, bool canMerge, bool canHash)
Oid OperatorLookup(List *operatorName, Oid leftObjectId, Oid rightObjectId, bool *defined)
END_CATALOG_STRUCT typedef FormData_pg_operator * Form_pg_operator
Definition pg_operator.h:87
ObjectAddress makeOperatorDependencies(HeapTuple tuple, bool makeExtensionDep, bool isUpdate)
void OperatorUpd(Oid baseId, Oid commId, Oid negId, bool isDelete)
unsigned int Oid
static int fb(int x)
Definition pg_list.h:54
Definition c.h:772