Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEvzU-0053Mg-DN for pgsql-general@arkaria.postgresql.org; Wed, 05 Jun 2024 19:08:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sEvzU-00ArIe-7l for pgsql-general@arkaria.postgresql.org; Wed, 05 Jun 2024 19:08:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEvzT-00ArID-Rh for pgsql-general@lists.postgresql.org; Wed, 05 Jun 2024 19:08:07 +0000 Received: from mout-u-107.mailbox.org ([80.241.59.207]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEvzM-003chF-F5 for pgsql-general@postgresql.org; Wed, 05 Jun 2024 19:08:06 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4VvcRb0KHfz9sT3; Wed, 5 Jun 2024 21:07:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1717614475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ScWAB2Ov+a6xXIxGFdhjB8bjXukKmIq4hRoehLirvNM=; b=kr2tSIiDtHT3um5XnV3QLkJmrtXZkxikOjuqmHDdDnankQW0ZqeLrtdEBbOAvd5GJwAJiL 2ZqOX/9G31riyODvZcYMKz0tDWtYN18tZyu/5fRBTg5nxnqSHP4zzu7DAn4Cl4Lk6Xe/Ua FD1djb3jB0GbmH9FmV4+MEKydDGpSXoWdnHjh3BWoD9nP9BpRTIh1FxagIFX2S6z7qFBb0 wWsKV+n1RlgxU+ziJhEHxQDDFAFNbAPLi8iNOcoVDS9KKlLh4KBCwSNhyiMqmYK3EaNZnw teqdKjzplvkV5qN+liH46+794t1Ttu7e/oqFh1uJ11yXXJk8+RUKT9Oewh1mBQ== Date: Wed, 5 Jun 2024 21:07:52 +0200 From: Erik Wienhold To: Marcos Pegoraro Cc: Postgres General Subject: Re: Length returns NULL ? Message-ID: <95b99197-de48-4456-8ead-1db366b4507f@ewie.name> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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