1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| CREATE TABLE parcelle
(
num_insee character varying(5) NOT NULL,
num_section character varying(5) NOT NULL,
num_parcelle character varying(4) NOT NULL,
num_parcelle_mere character varying(4),
num_prodcom character varying(15),
statut character varying(10),
nature_cadastrale character varying(50),
surface double precision,
the_geom geometry,
CONSTRAINT cle_parcelle PRIMARY KEY (num_insee, num_section, num_parcelle),
CONSTRAINT fkey_sect FOREIGN KEY (num_insee, num_section)
REFERENCES section (num_insee, num_section) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),
CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL),
CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 27572)
)
WITH (OIDS=FALSE);
ALTER TABLE parcelle OWNER TO postgres;
-- Index: fkidx_section
CREATE INDEX fkidx_section
ON parcelle
USING btree
(num_insee, num_section);
-- Index: parcelle_the_geom_gist
CREATE INDEX parcelle_the_geom_gist
ON parcelle
USING gist
(the_geom); |
Partager