mirror of
https://github.com/zebrajr/postgres.git
synced 2026-01-15 12:15:21 +00:00
Allow pg_monitor to execute pg_current_logfile().
We allow roles with privileges of pg_monitor to execute functions like pg_ls_logdir(), so it seems natural that such roles would also be able to execute this function. Bumps catversion. Co-authored-by: Pavlo Golub Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/CAK7ymcLmEYWyQkiCZ64WC-HCzXAB0omM%3DYpj9B3rXe8vUAFMqw%40mail.gmail.com
This commit is contained in:
@@ -254,3 +254,14 @@ FROM pg_walfile_name_offset('0/0'::pg_lsn + :segment_size - 1),
|
||||
-- test stratnum support functions
|
||||
SELECT gist_stratnum_identity(3::smallint);
|
||||
SELECT gist_stratnum_identity(18::smallint);
|
||||
|
||||
-- pg_current_logfile
|
||||
CREATE ROLE regress_current_logfile;
|
||||
-- not available by default
|
||||
SELECT has_function_privilege('regress_current_logfile',
|
||||
'pg_current_logfile()', 'EXECUTE');
|
||||
GRANT pg_monitor TO regress_current_logfile;
|
||||
-- role has privileges of pg_monitor and can execute the function
|
||||
SELECT has_function_privilege('regress_current_logfile',
|
||||
'pg_current_logfile()', 'EXECUTE');
|
||||
DROP ROLE regress_current_logfile;
|
||||
|
||||
Reference in New Issue
Block a user