Skip to content

Commit 80476ef

Browse files
committed
fix function interval_is_trivial() for 32-bit platforms
1 parent 369b49d commit 80476ef

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/pl_range_funcs.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,9 +701,16 @@ interval_is_trivial(Oid atttype, Datum interval, Oid interval_type)
701701
switch(atttype)
702702
{
703703
case INT2OID:
704+
default_value = Int16GetDatum(0);
705+
break;
706+
704707
case INT4OID:
708+
default_value = Int32GetDatum(0);
709+
break;
710+
711+
/* Take care of 32-bit platforms */
705712
case INT8OID:
706-
default_value = Int16GetDatum(0);
713+
default_value = Int64GetDatum(0);
707714
break;
708715

709716
case FLOAT4OID:

0 commit comments

Comments
 (0)