PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ _postgis_gserialized_index_extent()

Datum _postgis_gserialized_index_extent ( PG_FUNCTION_ARGS  )

Definition at line 2578 of file gserialized_estimate.c.

2579 {
2580  GBOX *gbox = NULL;
2581  int key_type;
2582  int att_num;
2583  Oid tbl_oid = PG_GETARG_DATUM(0);
2584  text *col = PG_GETARG_TEXT_P(1);
2585  Oid idx_oid;
2586 
2587  if(!tbl_oid)
2588  PG_RETURN_NULL();
2589 
2590  /* We need to initialize the internal cache to access it later via postgis_oid() */
2591  postgis_initialize_cache();
2592 
2593  idx_oid = table_get_spatial_index(tbl_oid, col, &key_type, &att_num);
2594  if (!idx_oid)
2595  PG_RETURN_NULL();
2596 
2597  gbox = spatial_index_read_extent(idx_oid, key_type, att_num);
2598  if (!gbox)
2599  PG_RETURN_NULL();
2600  else
2601  PG_RETURN_POINTER(gbox);
2602 }
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: