I need to determine whether any tables within my database have more than one geometry type. For example, I want to know if there are Points AND multipoints within the same table.

Currently, I have been using the command "ST_ASEWKT" to convert the "geom" column into EWKT and scrolling through the results, trying to find more than one geometry type. But I have table with over 50,000 records.

Is there a better way to do this?

1 Answer 1


For a given table, you can list the distinct types using geometryType()

SELECT DISTINCT geometryType(geom)
FROM mytable;
  • Thank you! I wasn't aware of this command, but it has achieved what I was having problems with! Commented Oct 31, 2019 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.