ST_FindExtent — Returns the exact extent of a geometry column.
box2d ST_FindExtent(text schema_name, text table_name, text geocolumn_name);
box2d ST_FindExtent(text table_name, text geocolumn_name);
Returns the exact extent of a geometry column as a box2d. If no schema is specified, the table is resolved using the search path. Pass the schema, table and column names with the case stored in the catalog. PostgreSQL folds unquoted identifiers to lower case.
This function computes the exact table extent by scanning the table. For a faster estimate based on table statistics, use ST_EstimatedExtent.
Availability: 2.2.0
Changed: 2.2.0. In prior versions this was called ST_Find_Extent.
This method supports Circular Strings and Curves.
SELECT ST_FindExtent('ny', 'edges', 'geom');
--result--
BOX(-8877653 4912316,-8010225.5 5589284)
SELECT ST_FindExtent('feature_poly', 'geom');
--result--
BOX(-124.659652709961 24.6830825805664,-67.7798080444336 49.0012092590332)