Project

General

Profile

« Previous | Next » 

Revision 9958

schemas/util.sql: added not_empty(anyarray)

View differences:

schemas/util.sql
915 915

  
916 916

  
917 917
--
918
-- Name: not_empty(anyarray); Type: FUNCTION; Schema: util; Owner: -
919
--
920

  
921
CREATE FUNCTION not_empty(value anyarray) RETURNS boolean
922
    LANGUAGE sql IMMUTABLE
923
    AS $_$
924
SELECT $1 IS NOT NULL AND array_length($1, 1)/*ARRAY[]->NULL*/ IS NOT NULL
925
$_$;
926

  
927

  
928
--
918 929
-- Name: not_null(anyelement); Type: FUNCTION; Schema: util; Owner: -
919 930
--
920 931

  

Also available in: Unified diff