* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.154 2003/09/03 22:05:08 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.155 2003/09/04 05:11:20 momjian Exp $
*
*--------------------------------------------------------------------
*/
/* Limit non-superuser changes */
if (record->context == PGC_USERLIMIT &&
source > PGC_S_UNPRIVILEGED &&
- newval < conf->session_val &&
+ newval < conf->reset_val &&
!superuser())
{
ereport(elevel,
/* Allow admin to override non-superuser setting */
if (record->context == PGC_USERLIMIT &&
source < PGC_S_UNPRIVILEGED &&
- record->session_source > PGC_S_UNPRIVILEGED &&
- newval > conf->session_val &&
+ record->reset_source > PGC_S_UNPRIVILEGED &&
+ newval > conf->reset_val &&
!superuser())
changeVal = changeVal_orig;
}
/* Limit non-superuser changes */
if (record->context == PGC_USERLIMIT &&
source > PGC_S_UNPRIVILEGED &&
- conf->session_val != 0 &&
- (newval > conf->session_val || newval == 0) &&
+ conf->reset_val != 0 &&
+ (newval > conf->reset_val || newval == 0) &&
!superuser())
{
ereport(elevel,
/* Allow admin to override non-superuser setting */
if (record->context == PGC_USERLIMIT &&
source < PGC_S_UNPRIVILEGED &&
- record->session_source > PGC_S_UNPRIVILEGED &&
- newval < conf->session_val &&
+ record->reset_source > PGC_S_UNPRIVILEGED &&
+ newval < conf->reset_val &&
!superuser())
changeVal = changeVal_orig;
}
/* Limit non-superuser changes */
if (record->context == PGC_USERLIMIT &&
source > PGC_S_UNPRIVILEGED &&
- newval > conf->session_val &&
+ newval > conf->reset_val &&
!superuser())
{
ereport(elevel,
/* Allow admin to override non-superuser setting */
if (record->context == PGC_USERLIMIT &&
source < PGC_S_UNPRIVILEGED &&
- record->session_source > PGC_S_UNPRIVILEGED &&
- newval < conf->session_val &&
+ record->reset_source > PGC_S_UNPRIVILEGED &&
+ newval < conf->reset_val &&
!superuser())
changeVal = changeVal_orig;
}
}
/* Allow admin to override non-superuser setting */
if (source < PGC_S_UNPRIVILEGED &&
- record->session_source > PGC_S_UNPRIVILEGED &&
- newval < conf->session_val &&
+ record->reset_source > PGC_S_UNPRIVILEGED &&
+ newval < conf->reset_val &&
!superuser())
changeVal = changeVal_orig;
}