Re: Length returns NULL ?

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Length returns NULL ?
Date: 2024-06-05 19:07:52
Message-ID: 95b99197-de48-4456-8ead-1db366b4507f@ewie.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2024-06-05 19:50 +0200, Marcos Pegoraro wrote:
> There are some functions called ...length, but only array_length returns
> NULL on empty array, why ?

Because the empty array has zero dimensions[1]. But now I'm wondering
why array_ndims returns NULL instead of zero for empty arrays.

[1] https://www.postgresql.org/message-id/603c8f070811061951u16034c3fk5dfaa493a6739a24%40mail.gmail.com

--
Erik

In response to

Browse pgsql-general by date

  From Date Subject
Next Message yudhi s 2024-06-05 19:21:46 Re: Long running query causing XID limit breach
Previous Message Marcos Pegoraro 2024-06-05 17:50:26 Length returns NULL ?