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.94.2) (envelope-from ) id 1szIC0-005Iwj-42 for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Oct 2024 16:08:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1szIBy-0073AW-EW for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Oct 2024 16:08:38 +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.94.2) (envelope-from ) id 1szIBy-00739d-4S for pgsql-hackers@lists.postgresql.org; Fri, 11 Oct 2024 16:08:38 +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.94.2) (envelope-from ) id 1szIBv-000O6h-Qb for pgsql-hackers@lists.postgresql.org; Fri, 11 Oct 2024 16:08:37 +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 49BG8O3N2864638; Fri, 11 Oct 2024 12:08:24 -0400 From: Tom Lane To: Pavel Stehule cc: Christoph Berg , Michael Banck , Tommy Pavlicek , =?UTF-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= , pgsql-hackers@lists.postgresql.org, jian.universality@gmail.com Subject: Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR) In-reply-to: References: <560086.1698160614@sss.pgh.pa.us> <570833.1698162135@sss.pgh.pa.us> <66f33840.050a0220.1f9e60.7fb9@mx.google.com> <325394.1727365907@sss.pgh.pa.us> <571930.1727454668@sss.pgh.pa.us> <621972.1727459684@sss.pgh.pa.us> <1092841.1727552736@sss.pgh.pa.us> <2245576.1728418678@sss.pgh.pa.us> Comments: In-reply-to Pavel Stehule message dated "Fri, 11 Oct 2024 15:37:24 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2864636.1728662904.1@sss.pgh.pa.us> Date: Fri, 11 Oct 2024 12:08:24 -0400 Message-ID: <2864637.1728662904@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pavel Stehule writes: > I tested it and it is working nicely. I tested it against Orafce and I > found an interesting point. The body of plpgsql functions is not checked. > Do you know the reason? In execute_extension_script(): /* * Similarly disable check_function_bodies, to ensure that SQL functions * won't be parsed during creation. */ if (check_function_bodies) (void) set_config_option("check_function_bodies", "off", PGC_USERSET, PGC_S_SESSION, GUC_ACTION_SAVE, true, 0, false); I wondered if we should reconsider that, but I'm afraid we'd be more likely to break working extensions than to do anything helpful. An extension author who wants that can do what I did in the patch's test cases: manually turn check_function_bodies on in the extension script. regards, tom lane