Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ioX6c-0005bz-Mx for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jan 2020 18:27:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ioX6Z-0007yb-MC for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jan 2020 18:27:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ioX6Z-0007yU-DU for pgsql-hackers@lists.postgresql.org; Mon, 06 Jan 2020 18:27:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ioX6W-0006Kx-4l for pgsql-hackers@lists.postgresql.org; Mon, 06 Jan 2020 18:27:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 006IRlIv008637; Mon, 6 Jan 2020 13:27:47 -0500 From: Tom Lane To: Robert Haas cc: Stephen Frost , Peter Eisentraut , PostgreSQL Hackers Subject: Re: Removing pg_pltemplate and creating "trustable" extensions In-reply-to: References: <5889.1566415762@sss.pgh.pa.us> <27727.1573052802@sss.pgh.pa.us> <20191107183856.GY6962@tamriel.snowman.net> <31658.1573152852@sss.pgh.pa.us> <20191107191320.GZ6962@tamriel.snowman.net> Comments: In-reply-to Robert Haas message dated "Mon, 06 Jan 2020 11:29:02 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8635.1578335267.1@sss.pgh.pa.us> Date: Mon, 06 Jan 2020 13:27:47 -0500 Message-ID: <8636.1578335267@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Thu, Nov 7, 2019 at 2:13 PM Stephen Frost wrote: >> I do not agree that we should just shift to using default roles instead >> of adding new options to GRANT because of an entirely internal >> implementation detail that we could fix (and should, as I've said for >> probably 10 years now...). > +1. > I'm not sure that Tom's latest design idea is a bad one, but I > strongly suspect that wrapping ourselves around the axle to work > around our unwillingness to widen a 16-bit quantity to 32 bits (or a > 32 bit quantity to 64 bits) is a bad idea. Perhaps there are also > design ideas that we should consider, like separating "basic" > privileges and "extended" privileges or coming up with some altogether > new and better representation. But limiting ourselves to 4 more > privileges ever cannot be the right solution. So, is that actually an objection to the current proposal, or just an unrelated rant? If we think that a privilege bit on databases can actually add something useful to this design, the fact that it moves us one bit closer to needing to widen AclMode doesn't seem like a serious objection. But I don't actually see what such a bit will buy for this purpose. A privilege bit on a database is presumably something that can be granted or revoked by the database owner, and I do not see that we want any such behavior for extension installation privileges. regards, tom lane