Fix possible crash in pg_dump with identity sequences.
[pgsql.git] / src / include / access / stratnum.h
blob8a47d3c9ec8072069b50e95fdab87ee90f766b3e
1 /*-------------------------------------------------------------------------
3 * stratnum.h
4 * POSTGRES strategy number definitions.
7 * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/access/stratnum.h
12 *-------------------------------------------------------------------------
14 #ifndef STRATNUM_H
15 #define STRATNUM_H
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.
22 typedef uint16 StrategyNumber;
24 #define InvalidStrategy ((StrategyNumber) 0)
27 * Strategy numbers for B-tree indexes.
29 #define BTLessStrategyNumber 1
30 #define BTLessEqualStrategyNumber 2
31 #define BTEqualStrategyNumber 3
32 #define BTGreaterEqualStrategyNumber 4
33 #define BTGreaterStrategyNumber 5
35 #define BTMaxStrategyNumber 5
38 * Strategy numbers for hash indexes. There's only one valid strategy for
39 * hashing: equality.
41 #define HTEqualStrategyNumber 1
43 #define HTMaxStrategyNumber 1
46 * Strategy numbers common to (some) GiST, SP-GiST and BRIN opclasses.
48 * The first few of these come from the R-Tree indexing method (hence the
49 * names); the others have been added over time as they have been needed.
51 #define RTLeftStrategyNumber 1 /* for << */
52 #define RTOverLeftStrategyNumber 2 /* for &< */
53 #define RTOverlapStrategyNumber 3 /* for && */
54 #define RTOverRightStrategyNumber 4 /* for &> */
55 #define RTRightStrategyNumber 5 /* for >> */
56 #define RTSameStrategyNumber 6 /* for ~= */
57 #define RTContainsStrategyNumber 7 /* for @> */
58 #define RTContainedByStrategyNumber 8 /* for <@ */
59 #define RTOverBelowStrategyNumber 9 /* for &<| */
60 #define RTBelowStrategyNumber 10 /* for <<| */
61 #define RTAboveStrategyNumber 11 /* for |>> */
62 #define RTOverAboveStrategyNumber 12 /* for |&> */
63 #define RTOldContainsStrategyNumber 13 /* for old spelling of @> */
64 #define RTOldContainedByStrategyNumber 14 /* for old spelling of <@ */
65 #define RTKNNSearchStrategyNumber 15 /* for <-> (distance) */
66 #define RTContainsElemStrategyNumber 16 /* for range types @> elem */
67 #define RTAdjacentStrategyNumber 17 /* for -|- */
68 #define RTEqualStrategyNumber 18 /* for = */
69 #define RTNotEqualStrategyNumber 19 /* for != */
70 #define RTLessStrategyNumber 20 /* for < */
71 #define RTLessEqualStrategyNumber 21 /* for <= */
72 #define RTGreaterStrategyNumber 22 /* for > */
73 #define RTGreaterEqualStrategyNumber 23 /* for >= */
74 #define RTSubStrategyNumber 24 /* for inet >> */
75 #define RTSubEqualStrategyNumber 25 /* for inet <<= */
76 #define RTSuperStrategyNumber 26 /* for inet << */
77 #define RTSuperEqualStrategyNumber 27 /* for inet >>= */
78 #define RTPrefixStrategyNumber 28 /* for text ^@ */
79 #define RTOldBelowStrategyNumber 29 /* for old spelling of <<| */
80 #define RTOldAboveStrategyNumber 30 /* for old spelling of |>> */
82 #define RTMaxStrategyNumber 30
85 #endif /* STRATNUM_H */