UPDATE temp.taxref SET cd_taxsup=NULL WHERE cd_taxsup='0'; INSERT INTO "temp".taxref(regne, cd_nom, cd_taxsup, cd_ref) VALUES ('vivant',349525,349525,349525); ALTER TABLE temp.taxref ADD CONSTRAINT fk_cd_taxsup_est_cd_nom FOREIGN KEY (cd_taxsup) REFERENCES temp.taxref (cd_nom) DEFERRABLE INITIALLY DEFERRED; CREATE INDEX cd_ref_ind ON temp.taxref USING btree (cd_ref); CREATE INDEX classe_ind ON temp.taxref USING btree (classe); CREATE INDEX famille_ind ON temp.taxref USING btree (famille); CREATE INDEX lb_nom_ind ON temp.taxref USING btree (lb_nom); CREATE INDEX nom_complet_ind ON temp.taxref USING btree (nom_complet); CREATE INDEX ordre_ind ON temp.taxref USING btree (ordre); CREATE INDEX phylum_ind ON temp.taxref USING btree (phylum); CREATE INDEX regne_ind ON temp.taxref USING btree (regne);