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 1p0pab-0002gJ-8i for pgsql-general@arkaria.postgresql.org; Thu, 01 Dec 2022 19:51:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p0paZ-0006nL-Dt for pgsql-general@arkaria.postgresql.org; Thu, 01 Dec 2022 19:51:19 +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 1p0paZ-0006nB-2x for pgsql-general@lists.postgresql.org; Thu, 01 Dec 2022 19:51:19 +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 1p0paW-0007ji-Vu for pgsql-general@lists.postgresql.org; Thu, 01 Dec 2022 19:51:18 +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 2B1JpBuq1697226; Thu, 1 Dec 2022 14:51:11 -0500 From: Tom Lane To: Dominique Devienne cc: Christophe Pettus , Adrian Klaver , Laurenz Albe , "David G. Johnston" , "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> <1579912.1669908194@sss.pgh.pa.us> <0730410A-9C79-4EE2-B21B-3502445A8700@thebuild.com> Comments: In-reply-to Dominique Devienne message dated "Thu, 01 Dec 2022 20:20:07 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1697224.1669924271.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 01 Dec 2022 14:51:11 -0500 Message-ID: <1697225.1669924271@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dominique Devienne writes: > On Thu, Dec 1, 2022 at 8:09 PM Christophe Pettus wrot= e: >> Since this is a custom-built system, there is nothing keeping you from = creating your own table in the database that stores the original text of t= he function. > That's not the point. If a DBA updates one of our triggers or proc or > whatever else, > the recorded info in a custom table won't be affected. We are diff'ing > the server-side > schema, against the expected in-memory model of the physical model. > Thus the dictionaries are the only source of truth we can trust for > the current state of the schema. > And beside minor syntactic differences, and some more troublesome > object-name rewrites, this is > exactly what we want. The system itself needs to preserve the original > DDL IMHO. --DD Do you really fail to see the contradictions in this? You want the database to preserve the original DDL, but you also want it to update in response to subsequent alterations. You can't have both those things. regards, tom lane