Project

General

Profile

« Previous | Next » 

Revision 7825

schemas/functions.sql: Added concat_delim() (also in public, but this copy is for use by the functions schema)

View differences:

schemas/functions.sql
476 476

  
477 477

  
478 478
--
479
-- Name: concat_delim(text, text[]); Type: FUNCTION; Schema: functions; Owner: -
480
--
481

  
482
CREATE FUNCTION concat_delim(delim text, VARIADIC text[]) RETURNS text
483
    LANGUAGE sql IMMUTABLE
484
    AS $_$
485
SELECT NULLIF(array_to_string($2, $1), ''::text)
486
$_$;
487

  
488

  
489
--
490
-- Name: FUNCTION concat_delim(delim text, VARIADIC text[]); Type: COMMENT; Schema: functions; Owner: -
491
--
492

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

  
495

  
496
--
479 497
-- Name: join_strs_transform(text, text, text); Type: FUNCTION; Schema: functions; Owner: -
480 498
--
481 499

  

Also available in: Unified diff