PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
stratnum.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * stratnum.h
4  * POSTGRES strategy number definitions.
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/access/stratnum.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef STRATNUM_H
15 #define STRATNUM_H
16 
17 /*
18  * Strategy numbers identify the semantics that particular operators have
19  * with respect to particular operator classes. In some cases a strategy
20  * subtype (an OID) is used as further information.
21  */
23 
24 #define InvalidStrategy ((StrategyNumber) 0)
25 
26 /*
27  * Strategy numbers for B-tree indexes.
28  */
29 #define BTLessStrategyNumber 1
30 #define BTLessEqualStrategyNumber 2
31 #define BTEqualStrategyNumber 3
32 #define BTGreaterEqualStrategyNumber 4
33 #define BTGreaterStrategyNumber 5
34 
35 #define BTMaxStrategyNumber 5
36 
37 
38 /*
39  * Strategy numbers common to (some) GiST, SP-GiST and BRIN opclasses.
40  *
41  * The first few of these come from the R-Tree indexing method (hence the
42  * names); the others have been added over time as they have been needed.
43  */
44 #define RTLeftStrategyNumber 1 /* for << */
45 #define RTOverLeftStrategyNumber 2 /* for &< */
46 #define RTOverlapStrategyNumber 3 /* for && */
47 #define RTOverRightStrategyNumber 4 /* for &> */
48 #define RTRightStrategyNumber 5 /* for >> */
49 #define RTSameStrategyNumber 6 /* for ~= */
50 #define RTContainsStrategyNumber 7 /* for @> */
51 #define RTContainedByStrategyNumber 8 /* for <@ */
52 #define RTOverBelowStrategyNumber 9 /* for &<| */
53 #define RTBelowStrategyNumber 10 /* for <<| */
54 #define RTAboveStrategyNumber 11 /* for |>> */
55 #define RTOverAboveStrategyNumber 12 /* for |&> */
56 #define RTOldContainsStrategyNumber 13 /* for old spelling of @> */
57 #define RTOldContainedByStrategyNumber 14 /* for old spelling of <@ */
58 #define RTKNNSearchStrategyNumber 15 /* for <-> (distance) */
59 #define RTContainsElemStrategyNumber 16 /* for range types @> elem */
60 #define RTAdjacentStrategyNumber 17 /* for -|- */
61 #define RTEqualStrategyNumber 18 /* for = */
62 #define RTNotEqualStrategyNumber 19 /* for != */
63 #define RTLessStrategyNumber 20 /* for < */
64 #define RTLessEqualStrategyNumber 21 /* for <= */
65 #define RTGreaterStrategyNumber 22 /* for > */
66 #define RTGreaterEqualStrategyNumber 23 /* for >= */
67 #define RTSubStrategyNumber 24 /* for inet >> */
68 #define RTSubEqualStrategyNumber 25 /* for inet <<= */
69 #define RTSuperStrategyNumber 26 /* for inet << */
70 #define RTSuperEqualStrategyNumber 27 /* for inet >>= */
71 
72 #define RTMaxStrategyNumber 27
73 
74 
75 #endif /* STRATNUM_H */
uint16 StrategyNumber
Definition: stratnum.h:22
unsigned short uint16
Definition: c.h:267