Re: array_length()

From: "Robert Haas" <robertmhaas(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, Decibel! <decibel(at)decibel(dot)org>, "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: array_length()
Date: 2008-11-07 03:56:13
Message-ID: 603c8f070811061956m1f17eef2p9ecfc7d0d1011ad2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2008-11-07 04:06:17 Re: array_length()
Previous Message Robert Haas 2008-11-07 03:51:23 Re: array_length()