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{
33 Oid oid; /* oid */
34
35 /* name of operator */
36 NameData oprname;
37
38 /* OID of namespace containing this oper */
40
41 /* operator owner */
43
44 /* 'l' for prefix or 'b' for infix */
45 char oprkind BKI_DEFAULT(b);
46
47 /* can be used in merge join? */
49
50 /* can be used in hash join? */
51 bool oprcanhash BKI_DEFAULT(f);
52
53 /* left arg type, or 0 if prefix operator */
54 Oid oprleft BKI_LOOKUP_OPT(pg_type);
55
56 /* right arg type */
57 Oid oprright BKI_LOOKUP(pg_type);
58
59 /* result datatype; can be 0 in a "shell" operator */
61
62 /* OID of commutator oper, or 0 if none */
64
65 /* OID of negator oper, or 0 if none */
67
68 /* OID of underlying function; can be 0 in a "shell" operator */
70
71 /* OID of restriction estimator, or 0 */
73
74 /* OID of join estimator, or 0 */
77
78/* ----------------
79 * Form_pg_operator corresponds to a pointer to a tuple with
80 * the format of pg_operator relation.
81 * ----------------
82 */
84
87
90
94 bool *defined);
95
104 Oid joinId,
105 bool canMerge,
106 bool canHash);
107
109 bool makeExtensionDep,
110 bool isUpdate);
111
115 bool hasCommutator,
116 bool hasNegator,
119 bool canMerge,
120 bool canHash);
121
122extern void OperatorUpd(Oid baseId, Oid commId, Oid negId, bool isDelete);
123
124#endif /* PG_OPERATOR_H */
Oid regproc
Definition c.h:663
#define DECLARE_UNIQUE_INDEX_PKEY(name, oid, oidmacro, tblname, decl)
Definition genbki.h:86
#define BKI_LOOKUP(catalog)
Definition genbki.h:46
#define BKI_DEFAULT(value)
Definition genbki.h:35
#define BKI_LOOKUP_OPT(catalog)
Definition genbki.h:47
#define DECLARE_UNIQUE_INDEX(name, oid, oidmacro, tblname, decl)
Definition genbki.h:85
#define CATALOG(name, oid, oidmacro)
Definition genbki.h:23
#define MAKE_SYSCACHE(name, idxname, nbuckets)
Definition genbki.h:127
int b
Definition isn.c:74
FormData_pg_operator
Definition pg_operator.h:76
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)
FormData_pg_operator * Form_pg_operator
Definition pg_operator.h:83
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:760