Re: BUG #14953: pg_blocking_pids / array_length inconsistency

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: steven(dot)winfield(at)cantabcapital(dot)com
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14953: pg_blocking_pids / array_length inconsistency
Date: 2017-12-07 15:07:27
Message-ID: CAL9smLAbczW=jsV41cYuaqdNCN8wg_LhyErV9ddO53k4i5M8AQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Dec 7, 2017 at 3:40 PM, <steven(dot)winfield(at)cantabcapital(dot)com> wrote:

> For what it's worth, I think having array_length('{}'::integer[], 1) = 0 is
> far more sensible, and
> making differently-dimensioned empty arrays compare equal (as mentioned
> previously[1]) is quite confusing.
>

I'm not saying this isn't a bug, but you might want to start using the
cardinality() function for comparisons like this.

.m

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Steven Winfield 2017-12-07 15:13:01 RE: BUG #14953: pg_blocking_pids / array_length inconsistency
Previous Message steven.winfield 2017-12-07 14:40:28 BUG #14953: pg_blocking_pids / array_length inconsistency