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 1k6f3g-00014e-Ov for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Aug 2020 19:08:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k6f3f-0000Q5-Hg for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Aug 2020 19:08:07 +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 1k6f3f-0000Py-0F for pgsql-hackers@lists.postgresql.org; Fri, 14 Aug 2020 19:08:07 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6f3X-0005eO-On for pgsql-hackers@lists.postgresql.org; Fri, 14 Aug 2020 19:08:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jKAWFfMb+HiVAlWq6IQm8zDdwfvslcOuOFdNB79VgtM=; b=UhJ7X9B58qXTCXVP3ypkzR3ip+ n1/RC6MrUKd3yNYRKmpebpxvZl41n3aIxVvoWC3s0tCaSKHxaHx0d6p/vMW/P6py+/rKp0/Wgxsmy gXCqNKY6jS3CciWLo5Zyl4WPOAp5nQdSwaFc21Kqg9PhsH3bOfe6PVUh3NPXFCoWvea3FGHqYGv7p 5mHiLuK42bUUd7o0SXf+M0dcoZ98p3JK4Pf5u8l+xEAchUNE7/rq4SomNnlwhujE50/Hqz/uHF/65 w9jp9th3HY2z6xGE/Ivgj6SrjD8L6a+AIciswDmpVIJI9w3g/xkDwooVYOmOofbx31aOk3PXlBRer LtI2LuoQ==; Received: from [184.19.31.139] (port=35615) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1k6f3R-004Fjr-FQ; Fri, 14 Aug 2020 15:07:54 -0400 Subject: Re: Loose ends after CVE-2020-14350 (extension installation hazards) To: Tom Lane , pgsql-hackers@lists.postgresql.org References: <653936.1597431032@sss.pgh.pa.us> From: Chapman Flack Message-ID: <5F36E107.50907@anastigmatix.net> Date: Fri, 14 Aug 2020 15:07:51 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <653936.1597431032@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 08/14/20 14:50, Tom Lane wrote: > SAVEPOINT s1; > SET LOCAL search_path = pg_catalog, pg_temp; > ... protected code here ... > RELEASE SAVEPOINT s1; > > but this does not work because SET LOCAL persists to the end of the > outer transaction. Maybe we could invent a variant that only lasts > for the current subtransaction. This reminds me of the way the SQL standard overloads WITH to supply lexically-scoped settings of things, as well as CTEs, mentioned a while back. [1] Would this provide additional incentive to implement that syntax, generalized to support arbitrary GUCs and not just the handful of specific settings the standard uses it for? Regards, -Chap [1] https://www.postgresql.org/message-id/5AAEAE0F.20006%40anastigmatix.net