Re: Removing pg_pltemplate and creating "trustable" extensions

Stephen Frost <[email protected]> Mon, 13 Jan 2020 15:57:57 -0500
Newsgroups gmane.comp.db.postgresql.devel.general
Message-ID <[email protected]>
Greetings,

* Tom Lane ([email protected]) wrote:
> Stephen Frost <[email protected]> writes:
> > * Tom Lane ([email protected]) wrote:
> >> In the meantime, though, this idea as stated doesn't do anything except
> >> let a DB owner grant install privileges to someone else.  I'm not even
> >> convinced that we want that, or that anyone needs it (I can recall zero
> >> such requests related to PLs in the past).  And for sure it does not
> >> belong in a minimal implementation of this feature.
> 
> > Yes, that's what this approach would do.  I suppose an alternative would
> > be to lump it in with "CREATE" rights on the DB, but I've advocated and
> > will continue to advocate for splitting up of such broad rights.
> > DB-level CREATE rights currently cover both schemas and publications,
> > for example, even though the two have rather little to do with each
> > other.
> 
> The patch as I'm proposing it has nothing to do with "CREATE" rights.
> You're attacking something different from what I actually want to do.

Yes, as an aside, I'm argueing that we should split up the general
CREATE privileges, but I also said that's not required for this.

You're asking "what's the best way to add this privilege to PG?".  I'm
saying that it should be done through the privilege system, similar to
publications.  I'd prefer it not be lumped into CREATE, but that at
least makes sense to me- adding a default role for this doesn't.  I
suppose making it akin to ALTER DATABASE and having it be limited to the
DB owner is also alright (as I said in my last email) but it means that
someone has to be given DB ownership rights in order to install
extensions.  I don't really see CREATE EXTENSION as being like ALTER
DATABASE from a privilege perspective, but having it be DB owner still
makes more sense than a default role for this.

Thanks,

Stephen
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJeHNnUAAoJEO1sijiDR2RVUEkP/jwJ1gpH5MvyRLO1rYcJdt3a
Noje1HmWSjmrGdONhoIs51n3ygLOQm5YXi5yGXwpkvxS29r2vHL+JCPwrNTYi5FD
75wZ5ux9XX78LM7uhL7Dptydg4RKtrqQQs6dg69Rq6gfUOGAkmYaprl9VFN4/3jv
+mSSAm8uW+YTjoBZBgyHgiKiR5Bc2XqN1JgEsBEJWSeC8oTCav2j1sTI5sCyAehF
r9qXLCGtPVrDZRgNf8QAaYPZyVYmpLpKWmfYOwhYXuS2dB3u/HNw5OS8pibosYRI
5x6qYU6omlh306Igr+qiQ5PR5dx3xaD2uG/GJxSM3XAIho8CQwFTci3CvrzaZOqn
/3KTI2HCICGIhZSnF1ik4NLkQ6eYcTj3eAUsOZOtmLOaZGSM0K2QkJbIkFWW6fWI
RaUoXCj9shR0fpzfgnGlUf6ALuYZai8pU653if0NG+xpyLQzqUYLaouwhadG3qYZ
sen0jeoP4Mdq90IpM6K+CX6vc1mMUpnGPfWbgDijEBaJRxSpv4KQxS/0WU5WqBON
HHwRSn8tI5YOQJFB8/x35Z7WRXX+cKFOKJyZPs6a4q4UcJankO3A9BqPI+DxkY0E
mM2jPIrWBijvprVDFcwUA0JkVV38U4jW3z0lcxQkVK4jVnXL41Eo3z/bHO8UmQVJ
uk6qBushR7xDaN754tH9
=GZv5
-----END PGP SIGNATURE-----