 FOR EACH ROW 
 EXECUTE PROCEDURE incrementer_nbBloc();
 
+
+
 COMMIT;

--------L'HISTORIQUE DE CREATION DE LIEN ENTRE DEUX ARTICLES
CREATE OR REPLACE FUNCTION process_tr_historique_article2() RETURNS TRIGGER AS $tr_historique_article2$
    BEGIN
		INSERT INTO HISTORIQUE_ARTICLE(id, art, aDate, login, aAction ) VALUES (nextval('idauto_his_art'), NEW.firstArticle ,current_timestamp,'$currentLogin','lier_article');
		INSERT INTO HISTORIQUE_ARTICLE(id, art, aDate, login, aAction ) VALUES (nextval('idauto_his_art'), NEW.secondArticle ,current_timestamp,'$currentLogin','lier_article');
		RETURN NULL;
    END;
$tr_historique_article2$ LANGUAGE plpgsql VOLATILE;

--------L'HISTORIQUE DE CREATION DE MOT CLE
CREATE OR REPLACE FUNCTION process_tr_historique_article3() RETURNS TRIGGER AS $tr_historique_article3$
    BEGIN
		INSERT INTO HISTORIQUE_ARTICLE(id, art, aDate, login, aAction ) VALUES (nextval('idauto_his_art'), NEW.art ,current_timestamp,NEW.modi,'mot_cle');
		RETURN NULL;
    END;
$tr_historique_article3$ LANGUAGE plpgsql VOLATILE;
