Re: Checking empty array - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Checking empty array
Date
Msg-id D960CB61B694CF459DCFB4B0128514C26ABD74@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Checking empty array  (Alexis Beuraud <alexis@siatel.com>)
List pgsql-general
Alexis Beuraud wrote:
> What is the correct way to check whether an array is empty?
>
> Here is what I do, in pseudo-code:
>
> -- Is my array empty now?
> IF (myarray isnull) THEN

Try this:

IF array_lower(myarray, 1) IS NULL THEN ... END IF

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: "Filip Rembiałkowski"
Date:
Subject: Re: Data cube in PostgreSQL
Next
From: Peter Eisentraut
Date:
Subject: Re: Collation sequence and use of operatings system's locale