PostgreSQL Source Code git master
cmptype.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * cmptype.h
4 * POSTGRES compare type definitions.
5 *
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
8 *
9 * src/include/access/cmptype.h
10 *
11 *-------------------------------------------------------------------------
12 */
13#ifndef CMPTYPE_H
14#define CMPTYPE_H
15
16/*
17 * CompareType - fundamental semantics of certain operators
18 *
19 * These enum symbols represent the fundamental semantics of certain operators
20 * that the system needs to have some hardcoded knowledge about. (For
21 * example, RowCompareExpr needs to know which operators can be determined to
22 * act like =, <>, <, etc.) Index access methods map (some of) strategy
23 * numbers to these values so that the system can know about the meaning of
24 * (some of) the operators without needing hardcoded knowledge of index AM's
25 * strategy numbering.
26 *
27 * XXX Currently, this mapping is not fully developed and most values are
28 * chosen to match btree strategy numbers, which is not going to work very
29 * well for other access methods.
30 */
31typedef enum CompareType
32{
34 COMPARE_LT = 1, /* BTLessStrategyNumber */
35 COMPARE_LE = 2, /* BTLessEqualStrategyNumber */
36 COMPARE_EQ = 3, /* BTEqualStrategyNumber */
37 COMPARE_GE = 4, /* BTGreaterEqualStrategyNumber */
38 COMPARE_GT = 5, /* BTGreaterStrategyNumber */
39 COMPARE_NE = 6, /* no such btree strategy */
43
44#endif /* CMPTYPE_H */
CompareType
Definition: cmptype.h:32
@ COMPARE_LE
Definition: cmptype.h:35
@ COMPARE_OVERLAP
Definition: cmptype.h:40
@ COMPARE_INVALID
Definition: cmptype.h:33
@ COMPARE_GT
Definition: cmptype.h:38
@ COMPARE_EQ
Definition: cmptype.h:36
@ COMPARE_NE
Definition: cmptype.h:39
@ COMPARE_CONTAINED_BY
Definition: cmptype.h:41
@ COMPARE_GE
Definition: cmptype.h:37
@ COMPARE_LT
Definition: cmptype.h:34