Re: array_length() - Mailing list pgsql-hackers

From Robert Haas
Subject Re: array_length()
Date
Msg-id 603c8f070811061956m1f17eef2p9ecfc7d0d1011ad2@mail.gmail.com
Whole thread Raw
In response to Re: array_length()  ("Robert Haas" <robertmhaas@gmail.com>)
List pgsql-hackers
> Hmm... the problem is that an empty array is really zero-dimensional.
> So for what values of the second argument ought we to return 0?
>
> It certainly seems inconsistent to say that array_length({}, 6) = 0
> and array_length({1}, 6) is null.

Ugh.  I meant rather:

It certainly seems inconsistent to say that array_length({}, 6) = 0
and array_upper({1}, 6) is null.

...Robert


pgsql-hackers by date:

Previous
From: "Robert Haas"
Date:
Subject: Re: array_length()
Next
From: "Brendan Jurd"
Date:
Subject: Re: Patch for ISO-8601-Interval Input and output.