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 1mxwfq-0007el-Ss for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Dec 2021 19:44:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mxwfp-0000FR-O9 for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Dec 2021 19:44:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxwfp-0000FF-GM for pgsql-bugs@lists.postgresql.org; Thu, 16 Dec 2021 19:44:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxwfn-0005qq-4q for pgsql-bugs@lists.postgresql.org; Thu, 16 Dec 2021 19:44:17 +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 1BGJiCxk1124028; Thu, 16 Dec 2021 14:44:12 -0500 From: Tom Lane To: John Naylor cc: PostgreSQL mailing lists Subject: Re: CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3 In-reply-to: References: <2352034.1628127322@sss.pgh.pa.us> <2395471.1628180285@sss.pgh.pa.us> <2501011.1628277029@sss.pgh.pa.us> Comments: In-reply-to John Naylor message dated "Thu, 16 Dec 2021 14:38:29 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1124026.1639683852.1@sss.pgh.pa.us> Date: Thu, 16 Dec 2021 14:44:12 -0500 Message-ID: <1124027.1639683852@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk John Naylor writes: > A customer reported a planning regression from 11.5 to 12.9. After > bisecting, it seems the fix for the thread subject here, commit > f230614da28, broke partition pruning in some cases. [ facepalm... ] I didn't consider the possibility that find_typmod_coercion_function would find something ... so we're getting an actual call of bpchar(), not just a RelabelType. regards, tom lane