SELECT 	cledivcad,
	section,
	code_dep,
	code_com,
	annee
INTO spatial.bdp_divcad_all
FROM  spatial.bdp_divcad;

INSERT INTO spatial.bdp_divcad_all
(cledivcad, section, code_dep, code_com, annee)
	SELECT cledivcad, section, code_dep, code_com, annee
	FROM spatial.histo_bdp_divcad;

ALTER TABLE spatial.bdp_divcad_all OWNER TO ludodo;
GRANT ALL ON TABLE spatial.bdp_divcad_all TO geomatique;
GRANT SELECT, REFERENCES, TRIGGER ON TABLE spatial.bdp_divcad_all TO public;
GRANT SELECT, REFERENCES, TRIGGER ON TABLE spatial.bdp_divcad_all TO cpnrc;

