Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)

From: Brendan Jurd <direvus(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Date: 2013-03-26 20:39:44
Message-ID: CADxJZo1DxNfvApjOA8WP_L1B5fddHdPBAaz-9BjQiMYof2hPpg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27 March 2013 06:47, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Mar 26, 2013 at 9:02 AM, Brendan Jurd <direvus(at)gmail(dot)com> wrote:
>> We can't sensibly test for whether an array is empty. I'd call that a
>> functional problem.
>
> Sure you can. Equality comparisons work just fine.
>
> rhaas=# select '{}'::int4[] = '{}'::int4[];

The good news is, if anybody out there is using that idiom to test for
emptiness, they will not be disrupted by the change.

Cheers,
BJ

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-03-26 20:44:45 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Previous Message Tom Lane 2013-03-26 20:33:53 Re: spoonbill vs. -HEAD