#include "utils/guc.h"

Go to the source code of this file.
| #define GUC_IS_IN_FILE 0x0001 |
Definition at line 164 of file guc_tables.h.
| typedef struct config_var_value config_var_value |
| enum config_group |
Definition at line 53 of file guc_tables.h.
{
UNGROUPED,
FILE_LOCATIONS,
CONN_AUTH,
CONN_AUTH_SETTINGS,
CONN_AUTH_SECURITY,
RESOURCES,
RESOURCES_MEM,
RESOURCES_DISK,
RESOURCES_KERNEL,
RESOURCES_VACUUM_DELAY,
RESOURCES_BGWRITER,
RESOURCES_ASYNCHRONOUS,
WAL,
WAL_SETTINGS,
WAL_CHECKPOINTS,
WAL_ARCHIVING,
REPLICATION,
REPLICATION_SENDING,
REPLICATION_MASTER,
REPLICATION_STANDBY,
QUERY_TUNING,
QUERY_TUNING_METHOD,
QUERY_TUNING_COST,
QUERY_TUNING_GEQO,
QUERY_TUNING_OTHER,
LOGGING,
LOGGING_WHERE,
LOGGING_WHEN,
LOGGING_WHAT,
STATS,
STATS_MONITORING,
STATS_COLLECTOR,
AUTOVACUUM,
CLIENT_CONN,
CLIENT_CONN_STATEMENT,
CLIENT_CONN_LOCALE,
CLIENT_CONN_OTHER,
LOCK_MANAGEMENT,
COMPAT_OPTIONS,
COMPAT_OPTIONS_PREVIOUS,
COMPAT_OPTIONS_CLIENT,
ERROR_HANDLING_OPTIONS,
PRESET_OPTIONS,
CUSTOM_OPTIONS,
DEVELOPER_OPTIONS
};
| enum config_type |
Definition at line 22 of file guc_tables.h.
{
PGC_BOOL,
PGC_INT,
PGC_REAL,
PGC_STRING,
PGC_ENUM
};
| enum GucStackState |
Definition at line 106 of file guc_tables.h.
{
/* This is almost GucAction, but we need a fourth state for SET+LOCAL */
GUC_SAVE, /* entry caused by function SET option */
GUC_SET, /* entry caused by plain SET command */
GUC_LOCAL, /* entry caused by SET LOCAL command */
GUC_SET_LOCAL /* entry caused by SET then SET LOCAL */
} GucStackState;
| void build_guc_variables | ( | void | ) |
Definition at line 3608 of file guc.c.
References FATAL, free, config_enum::gen, config_string::gen, config_real::gen, config_int::gen, config_bool::gen, guc_malloc(), guc_var_compare(), i, config_generic::name, qsort, and config_generic::vartype.
Referenced by GucInfoMain(), and InitializeGUCOptions().
{
int size_vars;
int num_vars = 0;
struct config_generic **guc_vars;
int i;
for (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 (i = 0; ConfigureNamesInt[i].gen.name; i++)
{
struct config_int *conf = &ConfigureNamesInt[i];
conf->gen.vartype = PGC_INT;
num_vars++;
}
for (i = 0; ConfigureNamesReal[i].gen.name; i++)
{
struct config_real *conf = &ConfigureNamesReal[i];
conf->gen.vartype = PGC_REAL;
num_vars++;
}
for (i = 0; ConfigureNamesString[i].gen.name; i++)
{
struct config_string *conf = &ConfigureNamesString[i];
conf->gen.vartype = PGC_STRING;
num_vars++;
}
for (i = 0; ConfigureNamesEnum[i].gen.name; i++)
{
struct config_enum *conf = &ConfigureNamesEnum[i];
conf->gen.vartype = PGC_ENUM;
num_vars++;
}
/*
* Create table with 20% slack
*/
size_vars = num_vars + num_vars / 4;
guc_vars = (struct config_generic **)
guc_malloc(FATAL, size_vars * sizeof(struct config_generic *));
num_vars = 0;
for (i = 0; ConfigureNamesBool[i].gen.name; i++)
guc_vars[num_vars++] = &ConfigureNamesBool[i].gen;
for (i = 0; ConfigureNamesInt[i].gen.name; i++)
guc_vars[num_vars++] = &ConfigureNamesInt[i].gen;
for (i = 0; ConfigureNamesReal[i].gen.name; i++)
guc_vars[num_vars++] = &ConfigureNamesReal[i].gen;
for (i = 0; ConfigureNamesString[i].gen.name; i++)
guc_vars[num_vars++] = &ConfigureNamesString[i].gen;
for (i = 0; ConfigureNamesEnum[i].gen.name; i++)
guc_vars[num_vars++] = &ConfigureNamesEnum[i].gen;
if (guc_variables)
free(guc_variables);
guc_variables = guc_vars;
num_guc_variables = num_vars;
size_guc_variables = size_vars;
qsort((void *) guc_variables, num_guc_variables,
sizeof(struct config_generic *), guc_var_compare);
}
| bool config_enum_lookup_by_name | ( | struct config_enum * | record, | |
| const char * | value, | |||
| int * | retval | |||
| ) |
Definition at line 5060 of file guc.c.
References config_enum_entry::name, config_enum::options, pg_strcasecmp(), and config_enum_entry::val.
Referenced by set_config_option().
{
const struct config_enum_entry *entry;
for (entry = record->options; entry && entry->name; entry++)
{
if (pg_strcasecmp(value, entry->name) == 0)
{
*retval = entry->val;
return TRUE;
}
}
*retval = 0;
return FALSE;
}
| const char* config_enum_lookup_by_value | ( | struct config_enum * | record, | |
| int | val | |||
| ) |
Definition at line 5037 of file guc.c.
References elog, ERROR, config_enum::gen, config_generic::name, config_enum_entry::name, config_enum::options, and config_enum_entry::val.
Referenced by _ShowOption(), call_enum_check_hook(), GetConfigOption(), GetConfigOptionByNum(), GetConfigOptionResetString(), and printMixedStruct().
| struct config_generic** get_guc_variables | ( | void | ) | [read] |
| const char* const config_group_names[] |
Definition at line 518 of file guc.c.
Referenced by GetConfigOptionByNum(), and printMixedStruct().
| const char* const config_type_names[] |
Definition at line 619 of file guc.c.
Referenced by GetConfigOptionByNum().
| const char* const GucContext_Names[] |
Definition at line 482 of file guc.c.
Referenced by GetConfigOptionByNum(), and printMixedStruct().
| const char* const GucSource_Names[] |
Definition at line 497 of file guc.c.
Referenced by GetConfigOptionByNum().
1.7.1