Is there any way to typecast Polygons to Multipolygon type?
For example, I have created a circle using ST_Buffer() on a point. The return type of that function is of Polygon type. The problem is that on the geometry column there is a restriction limiting it to Multipolygon type. So, I cannot insert a simple polygon.
I have used ST_MPolyFromText() function, but as usual it is returning null for that and ST_Dump() is not giving the proper output.
The constraint is:
CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'MULTIPOLYGON'::text OR geom IS NULL),