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 1mIkOU-0002MC-FF for pgsql-general@arkaria.postgresql.org; Wed, 25 Aug 2021 04:20:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mIkOS-0005kF-C6 for pgsql-general@arkaria.postgresql.org; Wed, 25 Aug 2021 04:20:04 +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 1mIkOS-0005k6-33 for pgsql-general@lists.postgresql.org; Wed, 25 Aug 2021 04:20:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIkOP-0007C5-L6 for pgsql-general@lists.postgresql.org; Wed, 25 Aug 2021 04:20:03 +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 17P4Jtuw513909; Wed, 25 Aug 2021 00:19:55 -0400 From: Tom Lane To: "David G. Johnston" cc: Li EF Zhang , Laurenz Albe , "pgsql-generallists.postgresql.org" Subject: Re: Can not ALTER TEXT SEARCH DICTIONARY intdict which is default in dict_int In-reply-to: References: <4c31310f6e4fbdaf490bad243c29dc541d516110.camel@cybertec.at> Comments: In-reply-to "David G. Johnston" message dated "Tue, 24 Aug 2021 21:01:07 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <513907.1629865195.1@sss.pgh.pa.us> Date: Wed, 25 Aug 2021 00:19:55 -0400 Message-ID: <513908.1629865195@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Tue, Aug 24, 2021 at 8:51 PM Li EF Zhang wrote: >> Thanks for your answer. My doubt is that since an ordinary user creates >> the extension, shouldn't be this user the owner of the objects created >> within the extension? > While that is a possible implementation choice, that isn't what was chosen. Let's be clear here: that is not some random implementor's decision. That is *necessary*, else the feature is completely insecure. The example given at the top of the thread isn't especially security-relevant, but there are a lot of other possible ALTER commands that are. For example, an ordinary user granted ownership of a "C"-language function can easily modify it in a way that allows her to gain full control of the installation. So we cannot implement trusted extensions by allowing the user requesting the install to own the individual objects within the extension. regards, tom lane