pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan B. <jan@monso.de>
To: Markus Bertheau <twanger@bluetwanger.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: ARRAY() returning NULL instead of ARRAY[] resp. {}
Date: Mon, 23 May 2005 18:54:07 +0000
Message-ID: <429226CF.4090207@monso.de> (raw)
In-Reply-To: <1116873219.7306.0.camel@localhost.localdomain>
References: <1116873219.7306.0.camel@localhost.localdomain>

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)



view thread (22+ messages)  latest in thread

Message-ID: <429226CF.4090207@monso.de>
Permalink:  ../429226CF.4090207@monso.de/
Also on:    postgresql.org/message-id/429226CF.4090207@monso.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jan@monso.de, twanger@bluetwanger.de
  Subject: Re: ARRAY() returning NULL instead of ARRAY[] resp. {}
  In-Reply-To: <429226CF.4090207@monso.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox