Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q8rs7-0001Zt-6R for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jun 2023 00:26:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q8rs4-0001K6-Nb for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jun 2023 00:26:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q8rs4-0001Js-E5 for pgsql-hackers@lists.postgresql.org; Tue, 13 Jun 2023 00:26:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q8rs1-001sa0-LU for pgsql-hackers@lists.postgresql.org; Tue, 13 Jun 2023 00:26:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 35D0Qjw71389830; Mon, 12 Jun 2023 20:26:45 -0400 From: Tom Lane To: Michael Paquier cc: Peter Eisentraut , Tomas Vondra , PostgreSQL Hackers Subject: Re: Shouldn't construct_array_builtin and deconstruct_array_builtin agree on types? In-reply-to: References: <3020223d-6cdc-8e15-56e6-bc8cfc6c2d81@enterprisedb.com> Comments: In-reply-to Michael Paquier message dated "Tue, 13 Jun 2023 08:23:06 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1389828.1686616005.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 12 Jun 2023 20:26:45 -0400 Message-ID: <1389829.1686616005@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Mon, Jun 12, 2023 at 11:06:18PM +0200, Peter Eisentraut wrote: >> They only support the types that they were actually being used with. I= f you >> need another type, feel free to add it. > FWIW, I agree with Tomas that this is an oversight that should be > fixed in v16, saving from the need to have a copy of > deconstruct_array_builtin() in extensions. We don't want to bloat these functions indefinitely, so I understand Peter's approach of only adding the cases actually being used. At the same time, it's reasonable to take some thought for extensions that might want slightly more functionality than the core code happens to need at any given moment. The idea of making both functions support the same set of types does seem like a reasonable compromise. regards, tom lane