File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -327,6 +327,7 @@ check_overlap(PG_FUNCTION_ARGS)
327
327
FmgrInfo cmp_func_1 ;
328
328
FmgrInfo cmp_func_2 ;
329
329
int i ;
330
+ bool byVal ;
330
331
331
332
prel = get_pathman_relation_info (parent_oid , NULL );
332
333
rangerel = get_pathman_range_relation (parent_oid , NULL );
@@ -338,11 +339,14 @@ check_overlap(PG_FUNCTION_ARGS)
338
339
cmp_func_1 = * get_cmp_func (p1_type , prel -> atttype );
339
340
cmp_func_2 = * get_cmp_func (p2_type , prel -> atttype );
340
341
342
+ byVal = rangerel -> by_val ;
341
343
ranges = (RangeEntry * ) dsm_array_get_pointer (& rangerel -> ranges );
342
344
for (i = 0 ; i < rangerel -> ranges .length ; i ++ )
343
345
{
344
- bool c1 = FunctionCall2 (& cmp_func_1 , p1 , ranges [i ].max );
345
- bool c2 = FunctionCall2 (& cmp_func_2 , p2 , ranges [i ].min );
346
+ bool c1 = FunctionCall2 (& cmp_func_1 , p1 ,
347
+ PATHMAN_GET_DATUM (ranges [i ].max , byVal ));
348
+ bool c2 = FunctionCall2 (& cmp_func_2 , p2 ,
349
+ PATHMAN_GET_DATUM (ranges [i ].min , byVal ));
346
350
347
351
if (c1 < 0 && c2 > 0 )
348
352
PG_RETURN_BOOL (true);
You can’t perform that action at this time.
0 commit comments