if $entry->{long_desc};
printf $ofh "\t\t\t.flags = %s,\n", $entry->{flags}
if $entry->{flags};
+ printf $ofh "\t\t\t.vartype = %s,\n", ('PGC_' . uc($type));
print $ofh "\t\t},\n";
printf $ofh "\t\t.variable = &%s,\n", $entry->{variable};
printf $ofh "\t\t.boot_val = %s,\n", $entry->{boot_val};
ALLOCSET_DEFAULT_SIZES);
/*
- * Count all the built-in variables, and set their vartypes correctly.
+ * Count all the built-in variables.
*/
for (int i = 0; ConfigureNamesBool[i].gen.name; i++)
- {
- struct config_bool *conf = &ConfigureNamesBool[i];
-
- /* Rather than requiring vartype to be filled in by hand, do this: */
- conf->gen.vartype = PGC_BOOL;
num_vars++;
- }
for (int i = 0; ConfigureNamesInt[i].gen.name; i++)
- {
- struct config_int *conf = &ConfigureNamesInt[i];
-
- conf->gen.vartype = PGC_INT;
num_vars++;
- }
for (int i = 0; ConfigureNamesReal[i].gen.name; i++)
- {
- struct config_real *conf = &ConfigureNamesReal[i];
-
- conf->gen.vartype = PGC_REAL;
num_vars++;
- }
for (int i = 0; ConfigureNamesString[i].gen.name; i++)
- {
- struct config_string *conf = &ConfigureNamesString[i];
-
- conf->gen.vartype = PGC_STRING;
num_vars++;
- }
for (int i = 0; ConfigureNamesEnum[i].gen.name; i++)
- {
- struct config_enum *conf = &ConfigureNamesEnum[i];
-
- conf->gen.vartype = PGC_ENUM;
num_vars++;
- }
/*
* Create hash table with 20% slack
const char *short_desc; /* short desc. of this variable's purpose */
const char *long_desc; /* long desc. of this variable's purpose */
int flags; /* flag bits, see guc.h */
+ enum config_type vartype; /* type of variable */
/* variable fields, initialized at runtime: */
- enum config_type vartype; /* type of variable (set only at startup) */
int status; /* status bits, see below */
GucSource source; /* source of the current actual value */
GucSource reset_source; /* source of the reset_value */