[postgis-users] is there any 'common' geometry type?

Stephen Woodbridge woodbri at swoodbridge.com
Mon Apr 12 20:40:34 PDT 2010


Li Li wrote:
> I have a table from oracle. a spatial column geom  is SDO_GEOMETRY. I
> migrated it to postgis. this geom column has record with type of
> POLYGON and MULTIPOLYGON. is there any common type that can store any
> geometry?

The common type in PostGIS is "geometry", but you can also change the 
constraints you table to allow both POLYGON and MULTIPOLYGON.

Or you can do something like:

update mytable set the_geom = ST_Multi(the_geom)
  where ST_GeometryType = "POLYGON';

-Steve W



More information about the postgis-users mailing list