Skip to main content

The query could be run against the geometry_columnsgeometry_columns table in this way

SELECT type 
FROM geometry_columns 
WHERE f_table_schema = 'my_schema' 
AND f_table_name = 'building' 
and f_geometry_column = 'geom';
SELECT type 
FROM geometry_columns 
WHERE f_table_schema = 'my_schema' 
AND f_table_name = 'building' 
and f_geometry_column = 'geom';

(or, if you are using a geographygeography type, subsititute geometry_columnsgeometry_columns with geography_columnsgeography_columns and f_geometry_columnf_geometry_column with f_geography_columnf_geography_column)

The query could be run against the geometry_columns table in this way

SELECT type 
FROM geometry_columns 
WHERE f_table_schema = 'my_schema' 
AND f_table_name = 'building' 
and f_geometry_column = 'geom';

(or, if you are using a geography type, subsititute geometry_columns with geography_columns and f_geometry_column with f_geography_column)

The query could be run against the geometry_columns table in this way

SELECT type 
FROM geometry_columns 
WHERE f_table_schema = 'my_schema' 
AND f_table_name = 'building' 
and f_geometry_column = 'geom';

(or, if you are using a geography type, subsititute geometry_columns with geography_columns and f_geometry_column with f_geography_column)

Source Link
atlefren
  • 4.3k
  • 21
  • 36

The query could be run against the geometry_columns table in this way

SELECT type 
FROM geometry_columns 
WHERE f_table_schema = 'my_schema' 
AND f_table_name = 'building' 
and f_geometry_column = 'geom';

(or, if you are using a geography type, subsititute geometry_columns with geography_columns and f_geometry_column with f_geography_column)