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 1jtwlA-00060x-RJ for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2020 17:24:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtwl9-0005yk-K2 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2020 17:24:27 +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 1jtwl9-0005yd-D0 for pgsql-hackers@lists.postgresql.org; Fri, 10 Jul 2020 17:24:27 +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 1jtwl6-0004vq-Qd for pgsql-hackers@postgresql.org; Fri, 10 Jul 2020 17:24:27 +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 06AHOLro2106878; Fri, 10 Jul 2020 13:24:21 -0400 From: Tom Lane To: Thomas Munro cc: Peter Eisentraut , pgsql-hackers Subject: Re: SQL-standard function body In-reply-to: References: <1c11f1eb-f00c-43b7-799d-2d44132c02d7@2ndquadrant.com> Comments: In-reply-to Thomas Munro message dated "Fri, 10 Jul 2020 18:35:40 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2106876.1594401861.1@sss.pgh.pa.us> Date: Fri, 10 Jul 2020 13:24:21 -0400 Message-ID: <2106877.1594401861@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > On Wed, Jul 1, 2020 at 5:49 AM Peter Eisentraut > wrote: >> - More test coverage is needed. Surprisingly, there wasn't actually any >> test AFAICT that just creates and SQL function and runs it. Most of >> that code is tested incidentally, but there is very little or no >> targeted testing of this functionality. > FYI cfbot showed a sign of some kind of error_context_stack corruption > while running "DROP TABLE functest3 CASCADE;". BTW, it occurs to me after answering bug #16534 that contrib/earthdistance's SQL functions would be great candidates for this new syntax. Binding their references at creation time is really exactly what we want. I still feel that we can't just replace the existing implementation, though, as that would kill too many use-cases where late binding is helpful. regards, tom lane