1256 GISTENTRY *entry = (GISTENTRY*) PG_GETARG_POINTER(0);
1257 StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
1259 char gidxmem[GIDX_MAX_SIZE];
1260 GIDX *query_gbox_index = (GIDX*)gidxmem;
1264 bool *recheck = (
bool *) PG_GETARG_POINTER(4);
1271 POSTGIS_DEBUG(4,
"[GIST] 'consistent' function called");
1274 if ( DatumGetPointer(PG_GETARG_DATUM(1)) == NULL )
1276 POSTGIS_DEBUG(4,
"[GIST] null query pointer (!?!), returning false");
1277 PG_RETURN_BOOL(
false);
1281 if ( DatumGetPointer(entry->key) == NULL )
1283 POSTGIS_DEBUG(4,
"[GIST] null index entry, returning false");
1284 PG_RETURN_BOOL(
false);
1288 if ( gserialized_datum_get_gidx_p(PG_GETARG_DATUM(1), query_gbox_index) ==
LW_FAILURE )
1290 POSTGIS_DEBUG(4,
"[GIST] null query_gbox_index!");
1291 PG_RETURN_BOOL(
false);
1295 if (GIST_LEAF(entry))
1298 (GIDX*)DatumGetPointer(entry->key),
1299 query_gbox_index, strategy);
1304 (GIDX*)DatumGetPointer(entry->key),
1305 query_gbox_index, strategy);
1308 PG_RETURN_BOOL(result);
static bool gserialized_gist_consistent_internal(GIDX *key, GIDX *query, StrategyNumber strategy)
static bool gserialized_gist_consistent_leaf(GIDX *key, GIDX *query, StrategyNumber strategy)