[postgis-users] Wondering why I can't use the geometry type in a CREATE statement.
Greg Militello
junk at thinkof.net
Mon Jun 28 06:20:01 PDT 2010
Stephen,
Had to fix the typos, but this does seem to work. thanks. Here is the updated SQL:
CREATE TABLE parks (
park_id INTEGER,
park_name VARCHAR,
park_date DATE,
park_type VARCHAR,
park_geom geometry,
CONSTRAINT enforce_dims_park_geom CHECK (st_ndims(park_geom) = 2),
CONSTRAINT enforce_geotype_park_geom CHECK (geometrytype(park_geom) = 'MULTIPOLYGON'::text OR park_geom IS NULL),
CONSTRAINT enforce_srid_park_geom CHECK (st_srid(park_geom) = 4326)
);
-Greg
On Jun 27, 2010, at 11:14 PM, Stephen Woodbridge wrote:
> CREATE TABLE parks (
> park_id INTEGER,
> park_name VARCHAR,
> park_date DATE,
> park_type VARCHAR,
> park_geom geomtery,
> CONSTRAINT enforce_dims_park_geom CHECK (st_ndims(park_geom) = 2),
> CONSTRAINT enforce_geotype_park_geom CHECK (geometrytype(park_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL),
> CONSTRAINT enforce_srid_park_geom CHECK (st_srid(park_geom) = 4326)
> );
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100628/9aab3172/attachment.html>
More information about the postgis-users
mailing list