Project

General

Profile

« Previous | Next » 

Revision 13909

schemas/util.sql: added subspecies()

View differences:

util.sql
4340 4340

  
4341 4341

  
4342 4342
--
4343
-- Name: subspecies(text); Type: FUNCTION; Schema: util; Owner: -
4344
--
4345

  
4346
CREATE FUNCTION subspecies(taxon_name text) RETURNS text
4347
    LANGUAGE sql IMMUTABLE
4348
    AS $_$
4349
SELECT (regexp_matches($1, '\ysubsp\. (\S+)'))[1]
4350
$_$;
4351

  
4352

  
4353
--
4343 4354
-- Name: table2hstore(regclass); Type: FUNCTION; Schema: util; Owner: -
4344 4355
--
4345 4356

  

Also available in: Unified diff