def getExotStatus(cursor, id_tax):
    """
    Get the alien/invasive status of a taxon, with the associated references and links
    
    Parameters
    -----------
    cursor: psycopg2 cursor
        cursor of the current operations in the postgres database (need to be of psycopg2.extras.RealDictCursor type, in order to obtain query results as python dictionaries)
    cd_tax: cd_tax of the accepted taxon
    
    Returns
    ----------
    Dictionary with the following elements:
        is_alien: bool
            Whether the taxon is alien or not in Colombia
        is_invasive : bool 
            Whether the taxon is invasive or not
        comments: str
            comments associated with the alien/invasive status of the species
        references: str 
            bibliographic references associated with the alien/invasive status of the species, separated with the "|" character (NOTE: If the status change through time, we keep the references corresponding to the previous alien/invasive statuses)
        links: str 
            URL links to ressources associated with the references in the "references" element        
    """
    SQL = "SELECT e.is_alien, e.is_invasive,  e.comments, STRING_AGG(r.citation, ' | ' ORDER BY r.cd_ref) AS references, STRING_AGG(r.link, ' | ' ORDER BY r.cd_ref) AS links FROM exot e LEFT JOIN ref_exot re ON e.cd_tax=re.cd_tax   LEFT JOIN refer r ON re.cd_ref=r.cd_ref WHERE e.cd_tax=%s GROUP BY e.is_alien, e.is_invasive, e.comments"
    cursor.execute(SQL,[id_tax])
    res = dict(cursor.fetchone())
    return res