Commit 0ecc8ac4 authored by Bruce Momjian's avatar Bruce Momjian

Add special checks for non-super-user setting LOG_MIN_DURATION_STATEMENT

to zero.
parent bf889e64
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>. * Written by Peter Eisentraut <peter_e@gmx.net>.
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.135 2003/07/09 06:47:34 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.136 2003/07/09 08:51:19 momjian Exp $
* *
*-------------------------------------------------------------------- *--------------------------------------------------------------------
*/ */
...@@ -2529,12 +2529,13 @@ set_config_option(const char *name, const char *value, ...@@ -2529,12 +2529,13 @@ set_config_option(const char *name, const char *value,
if (record->context == PGC_USERLIMIT && if (record->context == PGC_USERLIMIT &&
source > PGC_S_USERSTART && source > PGC_S_USERSTART &&
conf->session_val != 0 && conf->session_val != 0 &&
newval > conf->session_val && (newval > conf->session_val ||
newval == 0) &&
!superuser()) !superuser())
{ {
elog(elevel, "'%s': permission denied\n" elog(elevel, "'%s': permission denied\n"
"Only super-users can increase this value.", "Only super-users can increase this value "
name); "or set it to zero.", name);
return false; return false;
} }
/* Allow admin to override non-super user setting */ /* Allow admin to override non-super user setting */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment