1430 BOX2DF *unionL = NULL,
1434 maxoff = entryvec->n - 1;
1436 nbytes = (maxoff + 2) *
sizeof(OffsetNumber);
1437 v->spl_left = (OffsetNumber *) palloc(nbytes);
1438 v->spl_right = (OffsetNumber *) palloc(nbytes);
1439 v->spl_nleft = v->spl_nright = 0;
1441 for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i))
1443 BOX2DF *
cur = (BOX2DF *) DatumGetPointer(entryvec->vector[i].key);
1445 if (i <= (maxoff - FirstOffsetNumber + 1) / 2)
1447 v->spl_left[v->spl_nleft] = i;
1450 unionL = (BOX2DF *) palloc(
sizeof(BOX2DF));
1460 v->spl_right[v->spl_nright] = i;
1463 unionR = (BOX2DF *) palloc(
sizeof(BOX2DF));
1473 if (v->spl_ldatum_exists)
1474 adjustBox(unionL, (BOX2DF *) DatumGetPointer(v->spl_ldatum));
1475 v->spl_ldatum = PointerGetDatum(unionL);
1477 if (v->spl_rdatum_exists)
1478 adjustBox(unionR, (BOX2DF *) DatumGetPointer(v->spl_rdatum));
1479 v->spl_rdatum = PointerGetDatum(unionR);
1481 v->spl_ldatum_exists = v->spl_rdatum_exists =
false;
static void adjustBox(BOX2DF *b, BOX2DF *addon)