diff options
author | Teodor Sigaev | 2004-06-03 12:26:10 +0000 |
---|---|---|
committer | Teodor Sigaev | 2004-06-03 12:26:10 +0000 |
commit | 7b81988f9b5275e2cdf7bbb0ca0620a24f1afc82 (patch) | |
tree | a21263073a48e6b7f9e6949734a3f0724a799579 /contrib/btree_gist/btree_cash.c | |
parent | 921d749bd4c34c3349f1c254d5faa2f1cec03911 (diff) |
- Add aligment of variable data types
- Add aligment for interval data types
- Avoid floating point overflow in penalty functions
Janko Richter <[email protected]> and teodor
Diffstat (limited to 'contrib/btree_gist/btree_cash.c')
-rw-r--r-- | contrib/btree_gist/btree_cash.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/btree_gist/btree_cash.c b/contrib/btree_gist/btree_cash.c index feadd7a73e4..6c5acb3e7e1 100644 --- a/contrib/btree_gist/btree_cash.c +++ b/contrib/btree_gist/btree_cash.c @@ -126,8 +126,7 @@ gbt_cash_penalty(PG_FUNCTION_ARGS) *result = 0.0; - res = Max(newentry->upper - origentry->upper, 0) + - Max(origentry->lower - newentry->lower, 0); + penalty_range_enlarge ( origentry->lower, origentry->upper, newentry->lower, newentry->upper ); if ( res > 0 ){ *result += FLT_MIN ; |