@@ -2602,7 +2602,7 @@ brin_minmax_multi_consistent(PG_FUNCTION_ARGS)
2602
2602
2603
2603
for (keyno = 0 ; keyno < nkeys ; keyno ++ )
2604
2604
{
2605
- Datum matches ;
2605
+ bool matches ;
2606
2606
ScanKey key = keys [keyno ];
2607
2607
2608
2608
/* NULL keys are handled and filtered-out in bringetbitmap */
@@ -2618,7 +2618,7 @@ brin_minmax_multi_consistent(PG_FUNCTION_ARGS)
2618
2618
finfo = minmax_multi_get_strategy_procinfo (bdesc , attno , subtype ,
2619
2619
key -> sk_strategy );
2620
2620
/* first value from the array */
2621
- matches = FunctionCall2Coll (finfo , colloid , minval , value );
2621
+ matches = DatumGetBool ( FunctionCall2Coll (finfo , colloid , minval , value ) );
2622
2622
break ;
2623
2623
2624
2624
case BTEqualStrategyNumber :
@@ -2664,18 +2664,18 @@ brin_minmax_multi_consistent(PG_FUNCTION_ARGS)
2664
2664
finfo = minmax_multi_get_strategy_procinfo (bdesc , attno , subtype ,
2665
2665
key -> sk_strategy );
2666
2666
/* last value from the array */
2667
- matches = FunctionCall2Coll (finfo , colloid , maxval , value );
2667
+ matches = DatumGetBool ( FunctionCall2Coll (finfo , colloid , maxval , value ) );
2668
2668
break ;
2669
2669
2670
2670
default :
2671
2671
/* shouldn't happen */
2672
2672
elog (ERROR , "invalid strategy number %d" , key -> sk_strategy );
2673
- matches = 0 ;
2673
+ matches = false ;
2674
2674
break ;
2675
2675
}
2676
2676
2677
2677
/* the range has to match all the scan keys */
2678
- matching &= DatumGetBool ( matches ) ;
2678
+ matching &= matches ;
2679
2679
2680
2680
/* once we find a non-matching key, we're done */
2681
2681
if (!matching )
@@ -2686,7 +2686,7 @@ brin_minmax_multi_consistent(PG_FUNCTION_ARGS)
2686
2686
* have we found a range matching all scan keys? if yes, we're done
2687
2687
*/
2688
2688
if (matching )
2689
- PG_RETURN_DATUM ( BoolGetDatum ( true) );
2689
+ PG_RETURN_BOOL ( true);
2690
2690
}
2691
2691
2692
2692
/*
@@ -2703,7 +2703,7 @@ brin_minmax_multi_consistent(PG_FUNCTION_ARGS)
2703
2703
2704
2704
for (keyno = 0 ; keyno < nkeys ; keyno ++ )
2705
2705
{
2706
- Datum matches ;
2706
+ bool matches ;
2707
2707
ScanKey key = keys [keyno ];
2708
2708
2709
2709
/* we've already dealt with NULL keys at the beginning */
@@ -2723,18 +2723,18 @@ brin_minmax_multi_consistent(PG_FUNCTION_ARGS)
2723
2723
2724
2724
finfo = minmax_multi_get_strategy_procinfo (bdesc , attno , subtype ,
2725
2725
key -> sk_strategy );
2726
- matches = FunctionCall2Coll (finfo , colloid , val , value );
2726
+ matches = DatumGetBool ( FunctionCall2Coll (finfo , colloid , val , value ) );
2727
2727
break ;
2728
2728
2729
2729
default :
2730
2730
/* shouldn't happen */
2731
2731
elog (ERROR , "invalid strategy number %d" , key -> sk_strategy );
2732
- matches = 0 ;
2732
+ matches = false ;
2733
2733
break ;
2734
2734
}
2735
2735
2736
2736
/* the range has to match all the scan keys */
2737
- matching &= DatumGetBool ( matches ) ;
2737
+ matching &= matches ;
2738
2738
2739
2739
/* once we find a non-matching key, we're done */
2740
2740
if (!matching )
@@ -2743,10 +2743,10 @@ brin_minmax_multi_consistent(PG_FUNCTION_ARGS)
2743
2743
2744
2744
/* have we found a range matching all scan keys? if yes, we're done */
2745
2745
if (matching )
2746
- PG_RETURN_DATUM ( BoolGetDatum ( true) );
2746
+ PG_RETURN_BOOL ( true);
2747
2747
}
2748
2748
2749
- PG_RETURN_DATUM ( BoolGetDatum ( false) );
2749
+ PG_RETURN_BOOL ( false);
2750
2750
}
2751
2751
2752
2752
/*
0 commit comments