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 1jqesZ-0007Qv-Lp for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Jul 2020 15:42:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jqesX-0006F9-Ks for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Jul 2020 15:42:29 +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 1jqesX-0006F0-Du for pgsql-hackers@lists.postgresql.org; Wed, 01 Jul 2020 15:42:29 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqesV-0003fL-Bp for pgsql-hackers@postgresql.org; Wed, 01 Jul 2020 15:42:28 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jqesT-00050V-R8; Wed, 01 Jul 2020 11:42:25 -0400 Date: Wed, 1 Jul 2020 11:42:25 -0400 From: Bruce Momjian To: Tom Lane Cc: Robert Haas , Peter Eisentraut , pgsql-hackers Subject: Re: SQL-standard function body Message-ID: <20200701154225.GD5186@momjian.us> References: <1c11f1eb-f00c-43b7-799d-2d44132c02d7@2ndquadrant.com> <493812.1593541480@sss.pgh.pa.us> <494838.1593543098@sss.pgh.pa.us> <582467.1593612850@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <582467.1593612850@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Jul 1, 2020 at 10:14:10AM -0400, Tom Lane wrote: > Robert Haas writes: > > In my experience, there's certainly demand for some kind of mode where > > plpgsql functions get checked at function definition time, rather than > > at execution time. > > Yeah, absolutely agreed. But I'm afraid this proposal takes us too > far in the other direction: with this, you *must* have a 100% parseable > and semantically valid function body, every time all the time. > > So far as plpgsql is concerned, I could see extending the validator > to run parse analysis (not just raw parsing) on all SQL statements in > the body. This wouldn't happen of course with check_function_bodies off, > so it wouldn't affect dump/reload. But likely there would still be > demand for more fine-grained control over it ... or maybe it could > stop doing analysis as soon as it finds a DDL command? Is the SQL-standard function body verified as preventing function inlining? That seems to be a major downside. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee