aboutsummaryrefslogtreecommitdiff
path: root/contrib/intarray/_int_gist.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/intarray/_int_gist.c')
-rw-r--r--contrib/intarray/_int_gist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c
index 876a7b9a8ab..07108eb15eb 100644
--- a/contrib/intarray/_int_gist.c
+++ b/contrib/intarray/_int_gist.c
@@ -3,6 +3,8 @@
*/
#include "postgres.h"
+#include <limits.h>
+
#include "access/gist.h"
#include "access/skey.h"
@@ -191,7 +193,7 @@ g_int_compress(PG_FUNCTION_ARGS)
cand = 1;
while (len > MAXNUMRANGE * 2)
{
- min = 0x7fffffff;
+ min = INT_MAX;
for (i = 2; i < len; i += 2)
if (min > (dr[i] - dr[i - 1]))
{