aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_utils_num.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/btree_gist/btree_utils_num.h')
-rw-r--r--contrib/btree_gist/btree_utils_num.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/btree_gist/btree_utils_num.h b/contrib/btree_gist/btree_utils_num.h
index e9e9e9eb234..122fba379a1 100644
--- a/contrib/btree_gist/btree_utils_num.h
+++ b/contrib/btree_gist/btree_utils_num.h
@@ -41,6 +41,17 @@ typedef struct
* Numeric btree functions
*/
+
+#define penalty_range_enlarge(olower,oupper,nlower,nupper) do { \
+ res = 0; \
+ if ( (nupper) > (oupper) ) \
+ res += ( (nupper) - (oupper) ); \
+ if ( (olower) > (nlower) ) \
+ res += ( (olower) - (nlower) ); \
+} while (0);
+
+
+
extern bool gbt_num_consistent( const GBT_NUMKEY_R * key , const void * query,
const StrategyNumber * strategy , bool is_leaf,
const gbtree_ninfo * tinfo );