PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ _postgis_gserialized_index_extent()

Datum _postgis_gserialized_index_extent ( PG_FUNCTION_ARGS  )

Definition at line 2588 of file gserialized_estimate.c.

2589 {
2590  GBOX *gbox = NULL;
2591  int key_type;
2592  int att_num;
2593  Oid tbl_oid = PG_GETARG_DATUM(0);
2594  text *col = PG_GETARG_TEXT_P(1);
2595  Oid idx_oid;
2596 
2597  if(!tbl_oid)
2598  PG_RETURN_NULL();
2599 
2600  /* We need to initialize the internal cache to access it later via postgis_oid() */
2601  postgis_initialize_cache(fcinfo);
2602 
2603  idx_oid = table_get_spatial_index(tbl_oid, col, &key_type, &att_num);
2604  if (!idx_oid)
2605  PG_RETURN_NULL();
2606 
2607  gbox = spatial_index_read_extent(idx_oid, key_type, att_num);
2608  if (!gbox)
2609  PG_RETURN_NULL();
2610  else
2611  PG_RETURN_POINTER(gbox);
2612 }
static GBOX * spatial_index_read_extent(Oid idx_oid, int key_type, int att_num)
static Oid table_get_spatial_index(Oid tbl_oid, text *col, int *key_type, int *att_num)

References spatial_index_read_extent(), and table_get_spatial_index().

Here is the call graph for this function: