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 1p0lPE-0007al-EQ for pgsql-general@arkaria.postgresql.org; Thu, 01 Dec 2022 15:23:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p0lPC-0005BR-T5 for pgsql-general@arkaria.postgresql.org; Thu, 01 Dec 2022 15:23:18 +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 1p0lPC-0005BG-J4 for pgsql-general@lists.postgresql.org; Thu, 01 Dec 2022 15:23:18 +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 1p0lPA-0004YC-D2 for pgsql-general@lists.postgresql.org; Thu, 01 Dec 2022 15:23: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 2B1FNE5x1579913; Thu, 1 Dec 2022 10:23:14 -0500 From: Tom Lane To: "David G. Johnston" cc: "Martijn Tonies (Upscene Productions)" , pgsql-general@lists.postgresql.org Subject: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour In-reply-to: References: <23DE96C56DFC404096553A22DDC5093B@MARTIJNWS> Comments: In-reply-to "David G. Johnston" message dated "Thu, 01 Dec 2022 08:14:42 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1579911.1669908194.1@sss.pgh.pa.us> Date: Thu, 01 Dec 2022 10:23:14 -0500 Message-ID: <1579912.1669908194@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Thu, Dec 1, 2022 at 7:59 AM Martijn Tonies (Upscene Productions) < > m.tonies@upscene.com> wrote: >> Can you modify the server code to store the original body in proc.prosrc >> again? It would be very helpful. > I seem to recall that this option had been discussed and rejected when this > feature went in. The parsed body is a feature because its contents can be > updated due to, e.g., renaming of objects. The text source of the original > command would be unable to be updated in the same way and so it is possible > the text and the parsed contents would diverge over time, which is a > situation we do not want to have. Indeed. We used to have a similar situation with respect to column default expressions and CHECK constraint expressions. Eventually we got rid of the textual storage of both, because it couldn't be maintained in a reasonable way. I think the answer here is "don't use the new syntax if you want the function body stored textually". You can have one set of benefits, or the other set, but not both at once. regards, tom lane