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 1nK2Ou-0002Tl-Pt for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Feb 2022 18:18:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nK2Os-00018P-38 for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Feb 2022 18:18:06 +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 1nK2Or-00017J-Qj for pgsql-bugs@lists.postgresql.org; Tue, 15 Feb 2022 18:18:05 +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 1nK2Oo-0007Wj-8o for pgsql-bugs@lists.postgresql.org; Tue, 15 Feb 2022 18:18:04 +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 21FIHvlA3153442; Tue, 15 Feb 2022 13:17:57 -0500 From: Tom Lane To: "Delaney, Ed" cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: Postgres 13.5 out parameter argument with explicit cast fails with argument is not writable In-reply-to: References: <2959722.1644881309@sss.pgh.pa.us> Comments: In-reply-to "Delaney, Ed" message dated "Tue, 15 Feb 2022 18:12:29 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3153440.1644949077.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 15 Feb 2022 13:17:57 -0500 Message-ID: <3153441.1644949077@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Delaney, Ed" writes: > I could not find a reference to this change in the release notes, but si= nce it is a breaking change, perhaps it should be noted? The 2021-11-11 release notes all say * Don't discard a cast to the same type with unspecified type modifier (= Tom Lane) For example, if column f1 is of type numeric(18,3), the parser used to simply discard a cast like f1::numeric, on the grounds that it would have no run-time effect. That's true, but the exposed type of the expression should still be considered to be plain numeric, not numeric(18,3). This is important for correctly resolving the type of larger constructs, such as recursive UNIONs. regards, tom lane