Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/utils/misc/guc.c,v
retrieving revision 1.380
diff -c -r1.380 guc.c
*** src/backend/utils/misc/guc.c	12 Mar 2007 22:09:28 -0000	1.380
--- src/backend/utils/misc/guc.c	13 Mar 2007 10:03:26 -0000
***************
*** 2658,2678 ****
  
  	gen = guc_variables[idx];
  
- 	/*
- 	 * Even though this function could delete other types of variables as well,
- 	 * at the moment we only call it for custom variables that always have type
- 	 * string.
- 	 */
  	Assert(gen->group == CUSTOM_OPTIONS);
- 	Assert(gen->vartype == PGC_STRING);
  
! 	conf = (struct config_string *) gen;
! 	set_string_field(conf, &conf->reset_val, NULL);
! 	set_string_field(conf, &conf->tentative_val, NULL);
! 	for (stack = conf->gen.stack; stack; stack = prev)
  	{
! 		set_string_field(conf, &stack->tentative_val.stringval, NULL);
! 		set_string_field(conf, &stack->value.stringval, NULL);
  		prev = stack->prev;
  		pfree(stack);
  	}
--- 2658,2678 ----
  
  	gen = guc_variables[idx];
  
  	Assert(gen->group == CUSTOM_OPTIONS);
  
! 	if (gen->vartype == PGC_STRING)
! 	{
! 		conf = (struct config_string *) gen;
! 		set_string_field(conf, &conf->reset_val, NULL);
! 		set_string_field(conf, &conf->tentative_val, NULL);
! 	}
! 	for (stack = gen->stack; stack; stack = prev)
  	{
! 		if (gen->vartype == PGC_STRING)
! 		{
! 			set_string_field(conf, &stack->tentative_val.stringval, NULL);
! 			set_string_field(conf, &stack->value.stringval, NULL);
! 		}
  		prev = stack->prev;
  		pfree(stack);
  	}
***************
*** 2698,2706 ****
  	gen = guc_variables[idx];
  
  	Assert(gen->group == CUSTOM_OPTIONS);
- 	Assert(gen->vartype == PGC_STRING);
- 
- 	conf = (struct config_string *) gen;
  
  	/*
  	 * Here we check whether it is safe to really delete the variable
--- 2698,2703 ----
***************
*** 2723,2731 ****
  		 * then been deleted from the configuration file should behave
  		 * as if it had been introduced in the session.
  		 */
- 		Assert(gen->vartype == PGC_STRING);
  		gen->reset_source = PGC_S_DEFAULT;
! 		set_string_field(conf, &conf->reset_val, NULL);
  	}
  	else
  		guc_delete_variable(name);
--- 2720,2731 ----
  		 * then been deleted from the configuration file should behave
  		 * as if it had been introduced in the session.
  		 */
  		gen->reset_source = PGC_S_DEFAULT;
! 		if (gen->vartype == PGC_STRING)
! 		{
! 			conf = (struct config_string *) gen;
! 			set_string_field(conf, &conf->reset_val, NULL);
! 		}
  	}
  	else
  		guc_delete_variable(name);
