Commit f36ca9af authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent 47f5bb9f
...@@ -223,10 +223,7 @@ GIN_SUPPORT(int4, false, leftmostvalue_int4, btint4cmp) ...@@ -223,10 +223,7 @@ GIN_SUPPORT(int4, false, leftmostvalue_int4, btint4cmp)
static Datum static Datum
leftmostvalue_int8(void) leftmostvalue_int8(void)
{ {
/* return Int64GetDatum(PG_INT64_MIN);
* Use sequence's definition to keep compatibility.
*/
return Int64GetDatum(SEQ_MINVALUE);
} }
GIN_SUPPORT(int8, false, leftmostvalue_int8, btint8cmp) GIN_SUPPORT(int8, false, leftmostvalue_int8, btint8cmp)
...@@ -250,10 +247,7 @@ GIN_SUPPORT(float8, false, leftmostvalue_float8, btfloat8cmp) ...@@ -250,10 +247,7 @@ GIN_SUPPORT(float8, false, leftmostvalue_float8, btfloat8cmp)
static Datum static Datum
leftmostvalue_money(void) leftmostvalue_money(void)
{ {
/* return Int64GetDatum(PG_INT64_MIN);
* Use sequence's definition to keep compatibility.
*/
return Int64GetDatum(SEQ_MINVALUE);
} }
GIN_SUPPORT(money, false, leftmostvalue_money, cash_cmp) GIN_SUPPORT(money, false, leftmostvalue_money, cash_cmp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment