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

Re: Should array_length() Return NULL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should array_length() Return NULL
Date: 2013-03-15 22:42:29
Message-ID: 1182.1363387349@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"David E. Wheeler" <david(at)justatheory(dot)com> writes:
> Oh. Is there a way to declare an empty 1-dimension array?

Doesn't look like it:

regression=# select '[1:0]={}'::text[];
ERROR:  upper bound cannot be less than lower bound
LINE 1: select '[1:0]={}'::text[];
               ^

Possibly we should allow that, but just as with the other point, it
would require some thought and investigation to make sure we weren't
creating more problems than we solved.

			regards, tom lane


In response to

Responses

pgsql-hackers by date

Next:From: Dimitri FontaineDate: 2013-03-15 22:59:07
Subject: Re: in-catalog Extension Scripts and Control parameters (templates?)
Previous:From: Tom LaneDate: 2013-03-15 22:36:36
Subject: Re: Materialized view assertion failure in HEAD

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