From 2938eec7fe3d1215020dadef431bfa904c37e85e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 12 Jun 2001 22:54:06 +0000 Subject: Extend GUC concepts of parse_hook and assign_hook to all four supported datatypes, not only strings. parse_hook is useless for bool, I suppose, but it seems possibly useful for int and double to apply variable-specific constraints that are more complex than simple range limits. assign_hook is definitely useful for all datatypes --- we need it right now for bool to support date cache reset when changing Australian timezone rule setting. Also, clean up some residual problems with the reset all/show all patch, including memory leaks and mistaken reset of PostPortNumber. It seems best that RESET ALL not touch variables that don't have SUSET or USERSET context. --- src/backend/commands/variable.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/backend/commands/variable.c') diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c index 6f22bcc33d2..dd94509a7f2 100644 --- a/src/backend/commands/variable.c +++ b/src/backend/commands/variable.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.49 2001/06/07 04:50:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.50 2001/06/12 22:54:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -792,7 +792,9 @@ ResetPGVariable(const char *name) reset_datestyle(); reset_timezone(); - ResetAllOptions(); + ResetAllOptions(false); } else - SetConfigOption(name, NULL, superuser() ? PGC_SUSET : PGC_USERSET, false); + SetConfigOption(name, NULL, + superuser() ? PGC_SUSET : PGC_USERSET, + false); } -- cgit v1.2.3