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 1lGsMI-0002nk-J9 for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Mar 2021 23:53:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lGsMH-00008I-HQ for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Mar 2021 23:53:49 +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 1lGsMH-00008B-B3 for pgsql-hackers@lists.postgresql.org; Mon, 01 Mar 2021 23:53:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGsMB-0008Bo-HS for pgsql-hackers@lists.postgresql.org; Mon, 01 Mar 2021 23:53:48 +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 121NrfIS865851; Mon, 1 Mar 2021 18:53:41 -0500 From: Tom Lane To: Dian Fay cc: pgsql-hackers@lists.postgresql.org, Vik Fearing Subject: Re: TRIM_ARRAY In-reply-to: <161464047991.29967.8270411748023500393.pgcf@coridan.postgresql.org> References: <931d94fa-9238-47ba-6f17-01600a845417@postgresfriends.org> <161464047991.29967.8270411748023500393.pgcf@coridan.postgresql.org> Comments: In-reply-to Dian Fay message dated "Mon, 01 Mar 2021 23:14:39 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <865849.1614642821.1@sss.pgh.pa.us> Date: Mon, 01 Mar 2021 18:53:41 -0500 Message-ID: <865850.1614642821@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Dian Fay writes: > This basically does what it says, and the code looks good. The > documentation is out of alphabetical order (trim_array should appear > under cardinality rather than over)) but good otherwise. I was able to > "break" the function with an untyped null in psql: > select trim_array(null, 2); > ERROR: could not determine polymorphic type because input has type unknown That's a generic parser behavior for polymorphic functions, not something this particular function could or should dodge. regards, tom lane