PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ _postgis_gserialized_index_extent()

Datum _postgis_gserialized_index_extent ( PG_FUNCTION_ARGS  )

Definition at line 2598 of file gserialized_estimate.c.

2599 {
2600  GBOX *gbox = NULL;
2601  int key_type;
2602  int att_num;
2603  Oid tbl_oid = PG_GETARG_DATUM(0);
2604  text *col = PG_GETARG_TEXT_P(1);
2605  Oid idx_oid;
2606 
2607  if(!tbl_oid)
2608  PG_RETURN_NULL();
2609 
2610  /* We need to initialize the internal cache to access it later via postgis_oid() */
2611  postgis_initialize_cache();
2612 
2613  idx_oid = table_get_spatial_index(tbl_oid, col, &key_type, &att_num);
2614  if (!idx_oid)
2615  PG_RETURN_NULL();
2616 
2617  gbox = spatial_index_read_extent(idx_oid, key_type, att_num);
2618  if (!gbox)
2619  PG_RETURN_NULL();
2620  else
2621  PG_RETURN_POINTER(gbox);
2622 }
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: