Skip site navigation (1) Skip section navigation (2)

Re: Empty array IS NULL?

From: Joe Conway <mail(at)joeconway(dot)com>
To: Markus Bertheau <twanger(at)bluetwanger(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Empty array IS NULL?
Date: 2004-06-28 16:26:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Markus Bertheau wrote:
> is the empty array representable in PostgreSQL, and is it
> distinguishable from NULL?

Yes, and yes.

regression=# select '{}'::int[];
(1 row)

regression=# select NULL::int[];

(1 row)

Since NULL array elements are not currently supported, attempting to 
construct an array with a NULL element results in NULL, not an empty array.


In response to


pgsql-sql by date

Next:From: Franco Bruno BorghesiDate: 2004-06-28 16:30:16
Subject: Re: Need indexes on inherited tables?
Previous:From: Markus BertheauDate: 2004-06-28 16:01:54
Subject: Empty array IS NULL?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group