From: Bruce Momjian Date: Wed, 9 Jul 2003 08:51:19 +0000 (+0000) Subject: Add special checks for non-super-user setting LOG_MIN_DURATION_STATEMENT X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=20110b01257bd77fac746efcce05332efd8ded29;p=users%2Fbernd%2Fpostgres.git Add special checks for non-super-user setting LOG_MIN_DURATION_STATEMENT to zero. --- diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 3465e6f4d1..f0d7c1845b 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -2529,12 +2529,13 @@ set_config_option(const char *name, const char *value, if (record->context == PGC_USERLIMIT && source > PGC_S_USERSTART && conf->session_val != 0 && - newval > conf->session_val && + (newval > conf->session_val || + newval == 0) && !superuser()) { elog(elevel, "'%s': permission denied\n" - "Only super-users can increase this value.", - name); + "Only super-users can increase this value " + "or set it to zero.", name); return false; } /* Allow admin to override non-super user setting */