postgresql/src
Jeff Davis ff9618e82a Fix MAINTAIN privileges for toast tables and partitions.
Commit 60684dd8 left loose ends when it came to maintaining toast
tables or partitions.

For toast tables, simply skip the privilege check if the toast table
is an indirect target of the maintenance command, because the main
table privileges have already been checked.

For partitions, allow the maintenance command if the user has the
MAINTAIN privilege on the partition or any parent.

Also make CLUSTER emit "skipping" messages when the user doesn't have
privileges, similar to VACUUM.

Author: Nathan Bossart
Reported-by: Pavel Luzanov
Reviewed-by: Pavel Luzanov, Ted Yu
Discussion: https://postgr.es/m/20230113231339.GA2422750@nathanxps13
2023-01-14 00:16:23 -08:00
..
backend Fix MAINTAIN privileges for toast tables and partitions. 2023-01-14 00:16:23 -08:00
bin Revert "Get rid of the "new" and "old" entries in a view's rangetable." 2023-01-11 23:01:22 -05:00
common Code cleanup 2023-01-12 07:37:39 +01:00
fe_utils Common function for percent placeholder replacement 2023-01-11 10:42:35 +01:00
include Fix MAINTAIN privileges for toast tables and partitions. 2023-01-14 00:16:23 -08:00
interfaces Update copyright for 2023 2023-01-02 15:00:37 -05:00
makefiles Update copyright for 2023 2023-01-02 15:00:37 -05:00
pl New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
port Update copyright for 2023 2023-01-02 15:00:37 -05:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Fix MAINTAIN privileges for toast tables and partitions. 2023-01-14 00:16:23 -08:00
timezone Update copyright for 2023 2023-01-02 15:00:37 -05:00
tools Fix MSVC build 2023-01-11 14:41:52 +01:00
tutorial Update copyright for 2023 2023-01-02 15:00:37 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in autoconf: Move export_dynamic determination to configure 2022-12-06 18:55:28 -08:00
Makefile.shlib autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00