Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vQJWf-004yqg-2n for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Dec 2025 06:06:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vQJWe-005qxJ-1g for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Dec 2025 06:06:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vQJWe-005qxB-0o for pgsql-hackers@lists.postgresql.org; Tue, 02 Dec 2025 06:06:12 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vQJWc-002h7j-01 for pgsql-hackers@lists.postgresql.org; Tue, 02 Dec 2025 06:06:11 +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 5B265q8n295578; Tue, 2 Dec 2025 01:05:52 -0500 From: Tom Lane To: Pavel Stehule cc: Paul A Jungwirth , Heikki Linnakangas , PostgreSQL Hackers Subject: Re: Inline non-SQL SRFs using SupportRequestSimplify In-reply-to: References: <09de6afa-c33d-4d94-a5cb-afc6cea0d2bb@illuminatedcomputing.com> <1755478.1722020334@sss.pgh.pa.us> <956f8a6f-32a7-49ab-92a3-dca5c8afe112@illuminatedcomputing.com> <1466725.1725381721@sss.pgh.pa.us> <33b10538-2c88-4278-a65f-0c1e6f265cb7@illuminatedcomputing.com> <737313.1752528083@sss.pgh.pa.us> <440458.1763858681@sss.pgh.pa.us> Comments: In-reply-to Pavel Stehule message dated "Tue, 02 Dec 2025 06:52:21 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <295576.1764655552.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 02 Dec 2025 01:05:52 -0500 Message-ID: <295577.1764655552@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pavel Stehule writes: > ne 23. 11. 2025 v 1:45 odesílatel Tom Lane napsal: >> So after some thought I renamed inline_set_returning_function to >> inline_function_in_from, and made a bunch of other changes in names >> and comments to line up with that. > I checked this patch, and I think so using the body of the > function foo_from_bar is very confusing. Perhaps that example could use more documentation effort ... > More correct form should be > RAISE EXCEPTION 'halt - should not be executed directly'; ... but I don't agree with this at all. We specifically do not guarantee that replacement via SupportRequestSimplify will be honored, and I think the same must be true for SupportRequestInlineInFrom. Otherwise we risk breaking who-knows-how-many third-party tools, as well as cases where the optimizer declines to inline (eg, because there are volatile arguments). Besides, what's the value? regards, tom lane