Re: BUG #14953: pg_blocking_pids / array_length inconsistency - Mailing list pgsql-bugs

From Marko Tiikkaja
Subject Re: BUG #14953: pg_blocking_pids / array_length inconsistency
Date
Msg-id CAL9smLAbczW=jsV41cYuaqdNCN8wg_LhyErV9ddO53k4i5M8AQ@mail.gmail.com
Whole thread Raw
In response to BUG #14953: pg_blocking_pids / array_length inconsistency  (steven.winfield@cantabcapital.com)
Responses RE: BUG #14953: pg_blocking_pids / array_length inconsistency  (Steven Winfield <Steven.Winfield@cantabcapital.com>)
List pgsql-bugs
On Thu, Dec 7, 2017 at 3:40 PM, <steven.winfield@cantabcapital.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

pgsql-bugs by date:

Previous
From: steven.winfield@cantabcapital.com
Date:
Subject: BUG #14953: pg_blocking_pids / array_length inconsistency
Next
From: Steven Winfield
Date:
Subject: RE: BUG #14953: pg_blocking_pids / array_length inconsistency