git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: f2af8dc) | patch
Remove superuser checks in pgstattuple
2016年9月30日 02:13:38 +0000 (22:13 -0400)
2016年9月30日 02:13:38 +0000 (22:13 -0400)
commit fd321a1dfd64d30bf1652ea6b39b654304f68ae4
Remove superuser checks in pgstattuple

Now that we track initial privileges on extension objects and changes to
those permissions, we can drop the superuser() checks from the various
functions which are part of the pgstattuple extension and rely on the
GRANT system to control access to those functions.

Since a pg_upgrade will preserve the version of the extension which
existed prior to the upgrade, we can't simply modify the existing
functions but instead need to create new functions which remove the
checks and update the SQL-level functions to use the new functions
(and to REVOKE EXECUTE rights on those functions from PUBLIC).

Thanks to Tom and Andres for adding support for extensions to follow
update paths (see: 40b449a), allowing this patch to be much smaller
since no new base version script needed to be included.

Approach suggested by Noah.

Reviewed by Michael Paquier.
contrib/pgstattuple/Makefile diff | blob | blame | history
contrib/pgstattuple/pgstatapprox.c diff | blob | blame | history
contrib/pgstattuple/pgstatindex.c diff | blob | blame | history
contrib/pgstattuple/pgstattuple--1.4--1.5.sql [new file with mode: 0644] blob
contrib/pgstattuple/pgstattuple.c diff | blob | blame | history
contrib/pgstattuple/pgstattuple.control diff | blob | blame | history
doc/src/sgml/pgstattuple.sgml diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /