Commit 1574783b4ced0356fbc626af1a1a469faa6b41e1 gratifyingly removed hard-coded superuser checks from assorted functions, which makes it possible to GRANT EXECUTE ON FUNCTION pg_catalog.whatever() to unprivileged users if the DBA so desires. However, the functions in genfile.c still have hard-coded checks: pg_read_file(), pg_read_binary_file(), pg_stat_file(), and pg_ls_dir(). I think those functions ought to get the same treatment that the commit mentioned above gave to a bunch of others. Obviously, there's some risk of DBAs doing stupid things there, but stupidity is hard to prevent in a general way and nanny-ism is annoying. The use case I have in mind is a monitoring tool that needs access to one more of those functions -- in keeping with the principle of least privilege, it's much better to give the monitoring user only the privileges which it actually needs than to make it a superuser.
-- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers