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 1jqMAS-0001Aj-3b for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jun 2020 19:43:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jqMAQ-00068z-UU for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jun 2020 19:43:42 +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 1jqMAQ-00068r-N0 for pgsql-hackers@lists.postgresql.org; Tue, 30 Jun 2020 19:43:42 +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 1jqMAO-0004A1-IN for pgsql-hackers@postgresql.org; Tue, 30 Jun 2020 19:43:42 +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 05UJharM496795; Tue, 30 Jun 2020 15:43:36 -0400 From: Tom Lane To: Andres Freund cc: Peter Eisentraut , pgsql-hackers Subject: Re: SQL-standard function body In-reply-to: <20200630192606.brfidtzwjrftcum2@alap3.anarazel.de> References: <1c11f1eb-f00c-43b7-799d-2d44132c02d7@2ndquadrant.com> <20200630192606.brfidtzwjrftcum2@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 30 Jun 2020 12:26:06 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <496793.1593546216.1@sss.pgh.pa.us> Date: Tue, 30 Jun 2020 15:43:36 -0400 Message-ID: <496794.1593546216@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2020-06-30 19:49:04 +0200, Peter Eisentraut wrote: >> The function body is parsed at function definition time and stored as >> expression nodes in probin. So at run time, no further parsing is >> required. > Isn't a consequence of that that we'd get a lot more errors if any DDL > is done to tables involved in the query? In contrast to other languages > we'd not be able to handle column type changes etc, right? I suppose it'd act like column references in a view, ie the dependency mechanisms would forbid you from changing/dropping any column mentioned in one of these functions. regards, tom lane