Re: ARRAY() returning NULL instead of ARRAY[] resp. {} - Mailing list pgsql-sql

From Jan B.
Subject Re: ARRAY() returning NULL instead of ARRAY[] resp. {}
Date
Msg-id 429226CF.4090207@monso.de
Whole thread Raw
In response to ARRAY() returning NULL instead of ARRAY[] resp. {}  (Markus Bertheau <twanger@bluetwanger.de>)
Responses Re: ARRAY() returning NULL instead of ARRAY[] resp. {}  (Markus Bertheau <twanger@bluetwanger.de>)
List pgsql-sql
Markus Bertheau wrote:
> Hi,
> 
> why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of
> ARRAY[] resp. '{}'?
> 
> Markus
> 

Perhaps Arrays always have to contain at least one element? (I don't 
know for sure.)

SELECT array[];
ERROR:  syntax error at or near "]" at character 14
LINE 1: SELECT array[];

SELECT array[1]; array
------- {1}
(1 row)


pgsql-sql by date:

Previous
From: Markus Bertheau
Date:
Subject: ARRAY() returning NULL instead of ARRAY[] resp. {}
Next
From: Markus Bertheau
Date:
Subject: Re: ARRAY() returning NULL instead of ARRAY[] resp. {}