Project

General

Profile

« Previous | Next » 

Revision 7602

schemas/vegbien.sql: Added concat_delim()

View differences:

schemas/vegbien.my.sql
312 312

  
313 313

  
314 314
--
315
-- Name: concat_delim(text, varchar(255)); Type: FUNCTION; Schema: public; Owner: -
316
--
317

  
318

  
319

  
320

  
321
--
322
-- Name: FUNCTION concat_delim(delim varchar(255), VARIADIC varchar(255)); Type: COMMENT; Schema: public; Owner: -
323
--
324

  
325

  
326

  
327

  
328
--
315 329
-- Name: delete_scrubbed_taxondeterminations(text); Type: FUNCTION; Schema: public; Owner: -
316 330
--
317 331

  
schemas/vegbien.sql
658 658

  
659 659

  
660 660
--
661
-- Name: concat_delim(text, text[]); Type: FUNCTION; Schema: public; Owner: -
662
--
663

  
664
CREATE FUNCTION concat_delim(delim text, VARIADIC text[]) RETURNS text
665
    LANGUAGE sql IMMUTABLE
666
    AS $_$
667
SELECT NULLIF(array_to_string($2, $1), ''::text)
668
$_$;
669

  
670

  
671
--
672
-- Name: FUNCTION concat_delim(delim text, VARIADIC text[]); Type: COMMENT; Schema: public; Owner: -
673
--
674

  
675
COMMENT ON FUNCTION concat_delim(delim text, VARIADIC text[]) IS 'Similar to concat() but separates elements with a delimeter';
676

  
677

  
678
--
661 679
-- Name: delete_scrubbed_taxondeterminations(text); Type: FUNCTION; Schema: public; Owner: -
662 680
--
663 681

  

Also available in: Unified diff