I have a web application that needs to know the geometry type of a PostGIS table's geom field before inserting rows into it. I use the following query to determine the geometry type of the geom column:
SELECT GeometryType(geom) FROM my_schema.building LIMIT 1
This returns the geometry type of an actual row, so it does not work when my table is empty. How do I determine the geometry type of the geometry column itself?
geometryfor the type, while we can still not know if the geometry is point or line. – giser Sep 12 '18 at 04:26SELECT GeometryType(geom) FROM my_schema.building LIMIT 1like this as the OP post? It does not work if the table is empty. – giser Sep 15 '18 at 01:45geometrytype for all the table, can I create a view contains all the tables which may containpointslinespolyogn? – giser Sep 15 '18 at 01:46