   AND n.id_parent <> 0
   AND n.actif = true;
 --USAGE : 
---SELECT * FROM nomenclatures.v_statut_valid;+--SELECT * FROM nomenclatures.v_statut_valid;

CREATE FUNCTION get_filtered_nomenclature(idtype integer, myregne character varying, mygroup character varying) RETURNS SETOF integer
    LANGUAGE plpgsql IMMUTABLE
    AS $$
--fonction permettant de retourner une liste d'id_nomenclature selon le regne et/ou le group2_inpn transmis en paramètre.
  DECLARE
    thegroup character varying(255);
    theregne character varying(255);

    date_create timestamp without time zone DEFAULT now(),
    date_update timestamp without time zone DEFAULT now()
);
COMMENT ON TABLE bib_types_nomenclatures IS 'Description of the SINP nomenclatures list.';

CREATE TABLE t_nomenclatures (
    id_nomenclature integer NOT NULL,
