We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentc980be9 commit4d73380Copy full SHA for 4d73380
contrib/pg_pathman/pl_funcs.c
@@ -327,6 +327,7 @@ check_overlap(PG_FUNCTION_ARGS)
327
FmgrInfocmp_func_1;
328
FmgrInfocmp_func_2;
329
inti;
330
+boolbyVal;
331
332
prel=get_pathman_relation_info(parent_oid,NULL);
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);
340
cmp_func_2=*get_cmp_func(p2_type,prel->atttype);
341
342
+byVal=rangerel->by_val;
343
ranges= (RangeEntry*)dsm_array_get_pointer(&rangerel->ranges);
344
for (i=0;i<rangerel->ranges.length;i++)
345
{
-boolc1=FunctionCall2(&cmp_func_1,p1,ranges[i].max);
-boolc2=FunctionCall2(&cmp_func_2,p2,ranges[i].min);
346
+boolc1=FunctionCall2(&cmp_func_1,p1,
347
+PATHMAN_GET_DATUM(ranges[i].max,byVal));
348
+boolc2=FunctionCall2(&cmp_func_2,p2,
349
+PATHMAN_GET_DATUM(ranges[i].min,byVal));
350
351
if (c1<0&&c2>0)
352
PG_RETURN_BOOL(true);