1451 BOX2DF *unionL = NULL,
1455 maxoff = entryvec->n - 1;
1457 nbytes = (maxoff + 2) *
sizeof(OffsetNumber);
1458 v->spl_left = (OffsetNumber *) palloc(nbytes);
1459 v->spl_right = (OffsetNumber *) palloc(nbytes);
1460 v->spl_nleft = v->spl_nright = 0;
1462 for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i))
1464 BOX2DF *
cur = (BOX2DF *) DatumGetPointer(entryvec->vector[i].key);
1466 if (i <= (maxoff - FirstOffsetNumber + 1) / 2)
1468 v->spl_left[v->spl_nleft] = i;
1471 unionL = (BOX2DF *) palloc(
sizeof(BOX2DF));
1481 v->spl_right[v->spl_nright] = i;
1484 unionR = (BOX2DF *) palloc(
sizeof(BOX2DF));
1494 if (v->spl_ldatum_exists)
1495 adjustBox(unionL, (BOX2DF *) DatumGetPointer(v->spl_ldatum));
1496 v->spl_ldatum = BoxPGetDatum(unionL);
1498 if (v->spl_rdatum_exists)
1499 adjustBox(unionR, (BOX2DF *) DatumGetPointer(v->spl_rdatum));
1500 v->spl_rdatum = BoxPGetDatum(unionR);
1502 v->spl_ldatum_exists = v->spl_rdatum_exists =
false;
static void adjustBox(BOX2DF *b, BOX2DF *addon)