diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2016-07-17 09:15:37 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2016-07-17 09:15:37 -0400 |
commit | f36ca9af05dd0468cdee28fbdbded690a10ff08b (patch) | |
tree | 140d55fc09dd2830359a14c36017ef18af152525 | |
parent | 47f5bb9f539a7fff089724b1cbacc31613031895 (diff) | |
download | postgresql-f36ca9af05dd0468cdee28fbdbded690a10ff08b.tar.gz postgresql-f36ca9af05dd0468cdee28fbdbded690a10ff08b.zip |
Use correct symbol for minimum int64 value
The old code used SEQ_MINVALUE to get the smallest int64 value. This
was done as a convenience to avoid having to deal with INT64_IS_BUSTED,
but that is obsolete now. Also, it is incorrect because the smallest
int64 value is actually SEQ_MINVALUE-1. Fix by using PG_INT64_MIN.
-rw-r--r-- | contrib/btree_gin/btree_gin.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/contrib/btree_gin/btree_gin.c b/contrib/btree_gin/btree_gin.c index f74e912ed74..030b61097f6 100644 --- a/contrib/btree_gin/btree_gin.c +++ b/contrib/btree_gin/btree_gin.c @@ -223,10 +223,7 @@ GIN_SUPPORT(int4, false, leftmostvalue_int4, btint4cmp) static Datum leftmostvalue_int8(void) { - /* - * Use sequence's definition to keep compatibility. - */ - return Int64GetDatum(SEQ_MINVALUE); + return Int64GetDatum(PG_INT64_MIN); } GIN_SUPPORT(int8, false, leftmostvalue_int8, btint8cmp) @@ -250,10 +247,7 @@ GIN_SUPPORT(float8, false, leftmostvalue_float8, btfloat8cmp) static Datum leftmostvalue_money(void) { - /* - * Use sequence's definition to keep compatibility. - */ - return Int64GetDatum(SEQ_MINVALUE); + return Int64GetDatum(PG_INT64_MIN); } GIN_SUPPORT(money, false, leftmostvalue_money, cash_cmp) |