530 spgLeafConsistentIn *in = (spgLeafConsistentIn *)PG_GETARG_POINTER(0);
531 spgLeafConsistentOut *out = (spgLeafConsistentOut *)PG_GETARG_POINTER(1);
534 char gidxmem[GIDX_MAX_SIZE];
535 GIDX *leaf = (GIDX *)DatumGetPointer(in->leafDatum), *query_gbox_index = (GIDX *)gidxmem;
537 POSTGIS_DEBUG(4,
"[SPGIST] 'leaf consistent' function called");
540 out->recheck =
false;
543 out->leafValue = in->leafDatum;
546 for (i = 0; i < in->nkeys; i++)
548 StrategyNumber strategy = in->scankeys[i].sk_strategy;
549 Datum query = in->scankeys[i].sk_argument;
552 if (DatumGetPointer(query) == NULL)
554 POSTGIS_DEBUG(4,
"[SPGIST] null query pointer (!?!)");
559 if (gserialized_datum_get_gidx_p(query, query_gbox_index) ==
LW_FAILURE)
561 POSTGIS_DEBUG(4,
"[SPGIST] null query_gbox_index!");
584 elog(ERROR,
"unrecognized strategy: %d", strategy);
592 PG_RETURN_BOOL(flag);
bool gidx_contains(GIDX *a, GIDX *b)
bool gidx_equals(GIDX *a, GIDX *b)
bool gidx_overlaps(GIDX *a, GIDX *b)
#define SPGOverlapStrategyNumber
#define SPGSameStrategyNumber
#define SPGContainedByStrategyNumber
#define SPGContainsStrategyNumber