I'm trying to save the bounding box of a multipolygon into a polygon column like this:
UPDATE "mytbl" SET bb = ST_SetSRID(ST_Envelope(mp::geometry),4326) WHERE "mytbl"."id" = 1
But I receive the error:
PG::InvalidParameterValue: ERROR: Geometry type (MultiPolygon) does not match column type (Polygon)
I also tried to use the
ST_ConvexHull function but it gave me the same error.