
DECLARE FUNCTION get_organism_id(genus VARCHAR, species VARCHAR) RETURN INT;
COMMENT ON FUNCTION get_organism_id(VARCHAR, VARCHAR) IS
'returns an organism based on its binomial genus species unique key';

DECLARE FUNCTION get_organism_id(binomial VARCHAR) RETURN INT;
COMMENT ON FUNCTION get_organism_id(VARCHAR) IS
'returns an organism based on its binomial unique key. The binomial is passed as a single string. The string will split on the FIRST space - before the space is the genus, after the species. For example "Drosophila Melanogaster';

DECLARE FUNCTION get_organism_id_abbrev(binomial VARCHAR) RETURNS INT;
COMMENT ON FUNCTION get_organism_id_abbrev(VARCHAR) IS
'as get_organism_id(binomial), except only the first letter of the genus is used. In theory this should still result in a unique key';

