Check the consistency of the metadata specified in the typmod: SRID, type, and dimensionality.
If things are inconsistent, shut down the query.