diff options
| author | Peter Eisentraut | 2025-02-02 07:11:57 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2025-02-02 07:11:57 +0000 |
| commit | 119fc30dd5bd918819b864107ddc8baac51f4d22 (patch) | |
| tree | 792942fed830f1045641e8eb7c439efe1c732812 /src/include/nodes | |
| parent | d61b9662b09ea55d175680cc31b24768d95972f6 (diff) | |
Move CompareType to separate header file
We'll want to make use of it in more places, and we'd prefer to not
have to include all of primnodes.h everywhere.
Author: Mark Dilger <mark.dilger@enterprisedb.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com
Diffstat (limited to 'src/include/nodes')
| -rw-r--r-- | src/include/nodes/meson.build | 1 | ||||
| -rw-r--r-- | src/include/nodes/primnodes.h | 28 |
2 files changed, 2 insertions, 27 deletions
diff --git a/src/include/nodes/meson.build b/src/include/nodes/meson.build index f3dd5461fef..d1ca24dd32f 100644 --- a/src/include/nodes/meson.build +++ b/src/include/nodes/meson.build @@ -8,6 +8,7 @@ node_support_input_i = [ 'nodes/plannodes.h', 'nodes/execnodes.h', 'access/amapi.h', + 'access/cmptype.h', 'access/sdir.h', 'access/tableam.h', 'access/tsmapi.h', diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index 59e7bb26bbd..839e71d52f4 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -18,6 +18,7 @@ #define PRIMNODES_H #include "access/attnum.h" +#include "access/cmptype.h" #include "nodes/bitmapset.h" #include "nodes/pg_list.h" @@ -1452,33 +1453,6 @@ typedef struct RowExpr } RowExpr; /* - * CompareType - fundamental semantics of certain operators - * - * These enum symbols represent the fundamental semantics of certain operators - * that the system needs to have some hardcoded knowledge about. (For - * example, RowCompareExpr needs to know which operators can be determined to - * act like =, <>, <, etc.) Index access methods map (some of) strategy - * numbers to these values so that the system can know about the meaning of - * (some of) the operators without needing hardcoded knowledge of index AM's - * strategy numbering. - * - * XXX Currently, this mapping is not fully developed and most values are - * chosen to match btree strategy numbers, which is not going to work very - * well for other access methods. - */ -typedef enum CompareType -{ - COMPARE_LT = 1, /* BTLessStrategyNumber */ - COMPARE_LE = 2, /* BTLessEqualStrategyNumber */ - COMPARE_EQ = 3, /* BTEqualStrategyNumber */ - COMPARE_GE = 4, /* BTGreaterEqualStrategyNumber */ - COMPARE_GT = 5, /* BTGreaterStrategyNumber */ - COMPARE_NE = 6, /* no such btree strategy */ - COMPARE_OVERLAP, - COMPARE_CONTAINED_BY, -} CompareType; - -/* * RowCompareExpr - row-wise comparison, such as (a, b) <= (1, 2) * * We support row comparison for any operator that can be determined to |
