Project

General

Profile

« Previous | Next » 

Revision 10354

schemas/util.sql: array_length(anyarray), array_length(anyarray, dimension integer): turned off STRICT to allow dynamic inlining, which speeds up util.map_nulls(). this requires adding a `CASE WHEN $1 IS NULL THEN NULL` statement to array_length(anyarray, dimension integer) to replace the functionality provided by STRICT.

View differences:

schemas/util.sql
565 565
--
566 566

  
567 567
CREATE FUNCTION array_length("array" anyarray) RETURNS integer
568
    LANGUAGE sql IMMUTABLE STRICT
568
    LANGUAGE sql IMMUTABLE
569 569
    AS $_$
570 570
SELECT util.array_length($1, 1)
571 571
$_$;
......
576 576
--
577 577

  
578 578
CREATE FUNCTION array_length("array" anyarray, dimension integer) RETURNS integer
579
    LANGUAGE sql IMMUTABLE STRICT
579
    LANGUAGE sql IMMUTABLE
580 580
    AS $_$
581
SELECT COALESCE(pg_catalog.array_length($1, $2), 0)
581
SELECT CASE WHEN $1 IS NULL THEN NULL ELSE COALESCE(pg_catalog.array_length($1, $2), 0) END
582 582
$_$;
583 583

  
584 584

  

Also available in: Unified diff