How to get the geometry type of an empty PostGIS table?

المشرف العام

Administrator
طاقم الإدارة
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 1This 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?



أكثر...
 
أعلى