1255 GISTENTRY *entry = (GISTENTRY*) PG_GETARG_POINTER(0);
1256 StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
1258 char gidxmem[GIDX_MAX_SIZE];
1259 GIDX *query_gbox_index = (GIDX*)gidxmem;
1263 bool *recheck = (
bool *) PG_GETARG_POINTER(4);
1270 POSTGIS_DEBUG(4,
"[GIST] 'consistent' function called");
1273 if ( DatumGetPointer(PG_GETARG_DATUM(1)) == NULL )
1275 POSTGIS_DEBUG(4,
"[GIST] null query pointer (!?!), returning false");
1276 PG_RETURN_BOOL(
FALSE);
1280 if ( DatumGetPointer(entry->key) == NULL )
1282 POSTGIS_DEBUG(4,
"[GIST] null index entry, returning false");
1283 PG_RETURN_BOOL(
FALSE);
1287 if ( gserialized_datum_get_gidx_p(PG_GETARG_DATUM(1), query_gbox_index) ==
LW_FAILURE )
1289 POSTGIS_DEBUG(4,
"[GIST] null query_gbox_index!");
1290 PG_RETURN_BOOL(
FALSE);
1294 if (GIST_LEAF(entry))
1297 (GIDX*)DatumGetPointer(entry->key),
1298 query_gbox_index, strategy);
1303 (GIDX*)DatumGetPointer(entry->key),
1304 query_gbox_index, strategy);
1307 PG_RETURN_BOOL(result);
static bool gserialized_gist_consistent_leaf(GIDX *key, GIDX *query, StrategyNumber strategy)
static bool gserialized_gist_consistent_internal(GIDX *key, GIDX *query, StrategyNumber strategy)