Project

General

Profile

« Previous | Next » 

Revision 7826

schemas/functions.sql: _join*(): Use new concat_delim()

View differences:

schemas/functions.sql
205 205
CREATE FUNCTION _join("0" anyelement DEFAULT NULL::unknown, "1" anyelement DEFAULT NULL::unknown, "2" anyelement DEFAULT NULL::unknown, "3" anyelement DEFAULT NULL::unknown, "4" anyelement DEFAULT NULL::unknown, "5" anyelement DEFAULT NULL::unknown, "6" anyelement DEFAULT NULL::unknown, "7" anyelement DEFAULT NULL::unknown, "8" anyelement DEFAULT NULL::unknown, "9" anyelement DEFAULT NULL::unknown) RETURNS anyelement
206 206
    LANGUAGE sql IMMUTABLE
207 207
    AS $_$
208
SELECT nullif(array_to_string(ARRAY[$1, $2, $3, $4, $5, $6, $7, $8, $9, $10], '; '), '')
208
SELECT concat_delim('; ', $1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
209 209
$_$;
210 210

  
211 211

  
......
216 216
CREATE FUNCTION _join_words("0" anyelement DEFAULT NULL::unknown, "1" anyelement DEFAULT NULL::unknown, "2" anyelement DEFAULT NULL::unknown, "3" anyelement DEFAULT NULL::unknown, "4" anyelement DEFAULT NULL::unknown, "5" anyelement DEFAULT NULL::unknown, "6" anyelement DEFAULT NULL::unknown, "7" anyelement DEFAULT NULL::unknown, "8" anyelement DEFAULT NULL::unknown, "9" anyelement DEFAULT NULL::unknown) RETURNS anyelement
217 217
    LANGUAGE sql IMMUTABLE
218 218
    AS $_$
219
SELECT nullif(array_to_string(ARRAY[$1, $2, $3, $4, $5, $6, $7, $8, $9, $10], ' '), '')
219
SELECT concat_delim(' ', $1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
220 220
$_$;
221 221

  
222 222

  

Also available in: Unified diff