Код: Выделить всё
CREATE TABLE foo
(
id integer NOT NULL DEFAULT nextval('foo_id_seq'::regclass),
the_geom_point geometry,
the_geom_line geometry,
CONSTRAINT foo_pkey PRIMARY KEY (id),
CONSTRAINT enforce_dims_the_geom_point CHECK (st_ndims(the_geom_point) = 2),
CONSTRAINT enforce_dims_the_geom_line CHECK (st_ndims(the_geom_line) = 2),
CONSTRAINT enforce_geotype_the_geom_point CHECK (geometrytype(the_geom_point) = 'POINT'::text OR the_geom_point IS NULL),
CONSTRAINT enforce_geotype_the_geom_line CHECK (geometrytype(the_geom_line) = 'LINESTRING'::text OR the_geom_line IS NULL),
CONSTRAINT enforce_srid_the_geom_point CHECK (st_srid(the_geom_point) = 900913),
CONSTRAINT enforce_srid_the_geom_line CHECK (st_srid(the_geom_line) = 900913)
)
Или я что-то делаю не так?
Спасибо