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 1p16lW-0005SD-8O for pgsql-general@arkaria.postgresql.org; Fri, 02 Dec 2022 14:11:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p16lV-0003Hc-2b for pgsql-general@arkaria.postgresql.org; Fri, 02 Dec 2022 14:11:45 +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 1p16l2-0004Kd-Ik for pgsql-general@lists.postgresql.org; Fri, 02 Dec 2022 14:11:17 +0000 Received: from resqmta-a1p-077721.sys.comcast.net ([2001:558:fd01:2bb4::a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p16kz-0000ym-65 for pgsql-general@lists.postgresql.org; Fri, 02 Dec 2022 14:11:16 +0000 Received: from resomta-a1p-077051.sys.comcast.net ([96.103.145.229]) by resqmta-a1p-077721.sys.comcast.net with ESMTP id 16dgpDA1Dmz3e16krpiJl1; Fri, 02 Dec 2022 14:11:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1669990265; bh=J1owWxaGrcA17ZT8mVjsa8mZW6o3jpMCH+kibiVmHvo=; h=Received:Received:Date:From:To:Message-ID:Subject:MIME-Version: Content-Type:Xfinity-Spam-Result; b=iONGfQFQUX3lMoCPa+mRO0zDw2Et/FdnFdTpDFrK7kiLhAwTO0HAsUHoMlxvORIC6 f6uORIzOSENsH42YUsNa9i7JyfPL65Ab6ulThmIHaoWk1g0NjEMf7PkBg/cM9TUUGh PSC/OyKdtkEp1SAWNsHHy9Cw5W94dEhTGEJHnKmQE6qZQRwC4Y9QSy42YXlFbjL3XN IRKcqwr6aUVTLDzfpVvKElVthq1UfugMltusxcr1buQC5MIWSiUFrASl2CrjNoOF4Z ZnfDFieDZuPfTpmYQ5MdhGkwbA30H7fG42r4QhYYRCkpMJY2/XkT1uSC8toOloTmKI KtziN+fc5TxCg== Received: from oxapp-asc-28o.email.comcast.net ([96.118.219.229]) by resomta-a1p-077051.sys.comcast.net with ESMTPS id 16kjpJFBekCAQ16kjpZu9D; Fri, 02 Dec 2022 14:11:00 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvhedrtdekgdefkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvvefkjghfufggtgfgrfgkofhisehtjegstdertdejnecuhfhrohhmpeffteggkfffucftqffvjfcuoegruggrphhtrhhonhestghomhgtrghsthdrnhgvtheqnecuggftrfgrthhtvghrnhephefhkeejhffgffffhfdvieelvefguedvtdejtdevtefhiefhtdetvdehhedukeefnecukfhppeeliedruddukedrvdduledrvddvledpvdeitddumeduledumeekgedttdemugdvrgdtmeektgeiudemleelgegrmeehjegvugemsggsvgelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepohigrghpphdqrghstgdqvdekohdrvghmrghilhdrtghomhgtrghsthdrnhgvthdpihhnvghtpeeliedruddukedrvdduledrvddvledpmhgrihhlfhhrohhmpegruggrphhtrhhonhestghomhgtrghsthdrnhgvthdpnhgspghrtghpthhtohepkedprhgtphhtthhopeguuggvvhhivghnnhgvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhglhesshhsshdrphhghhdrphgrrdhushdprhgtphhtthhopeigohhfsehthhgvsghuihhlugdrtghomhdprhgtphhtthhopegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhrtghpthhtoheplhgruhhrvghniidrrghlsggvsegthigsvghrthgvtgdrrghtpdhrtghpthhtohepuggrvhhiugdrghdrjhhohhhnshhtohhnsehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhdrthhonhhivghssehuphhstggvnhgvrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-Xfinity-VMeta: sc=-100.00;st=legit Date: Fri, 2 Dec 2022 09:10:57 -0500 (EST) From: DAVID ROTH To: Dominique Devienne , Tom Lane Cc: Christophe Pettus , Adrian Klaver , Laurenz Albe , "David G. Johnston" , "Martijn Tonies (Upscene Productions)" , pgsql-general@lists.postgresql.org Message-ID: <1258414512.930087.1669990257195@connect.xfinity.com> In-Reply-To: References: <23DE96C56DFC404096553A22DDC5093B@MARTIJNWS> <1579912.1669908194@sss.pgh.pa.us> <0730410A-9C79-4EE2-B21B-3502445A8700@thebuild.com> <1697225.1669924271@sss.pgh.pa.us> Subject: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.5-Rev21 X-Originating-IP: 2601:191:8400:d2a0:8c61:994a:57ed:bbe9 X-Originating-Client: open-xchange-appsuite List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Is there a way to reverse engineer the original code (or its equivalent) from what is saved in the database? > On 12/02/2022 8:48 AM Dominique Devienne wrote: > > > On Thu, Dec 1, 2022 at 8:51 PM Tom Lane wrote: > > 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 > > Hi. I probably didn't express myself correctly. I don't think there's > a contradiction. > > I originally wrote: > "maintaining the original, at least until a re-write is necessary on renames". > > But that I meant that the SQL would be preserved as-is, *initially*. > But that if/when a rename affecting that SQL happens, then it's fair > game to re-write it. > Because then the diff between my in-memory code-generated DDL, and the > server-side > DDL is no longer a false positive, as it is now from the "pre-emptive" re-write. > > What is creating me pain, is the fact the re-write of the SQL is > *eager* instead of *lazy*. > I.e. I'm paying for the rewrite, even when it's not strictly necessary > (from my POV at least). > > I hope that makes more sense. Thanks, --DD