PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | ConfigVariable |
struct | config_enum_entry |
Macros | |
#define | MAX_KILOBYTES (INT_MAX / 1024) |
#define | PG_AUTOCONF_FILENAME "postgresql.auto.conf" |
#define | GUC_QUALIFIER_SEPARATOR '.' |
#define | GUC_LIST_INPUT 0x0001 /* input can be list format */ |
#define | GUC_LIST_QUOTE 0x0002 /* double-quote list elements */ |
#define | GUC_NO_SHOW_ALL 0x0004 /* exclude from SHOW ALL */ |
#define | GUC_NO_RESET_ALL 0x0008 /* exclude from RESET ALL */ |
#define | GUC_REPORT 0x0010 /* auto-report changes to client */ |
#define | GUC_NOT_IN_SAMPLE 0x0020 /* not in postgresql.conf.sample */ |
#define | GUC_DISALLOW_IN_FILE 0x0040 /* can't set in postgresql.conf */ |
#define | GUC_CUSTOM_PLACEHOLDER 0x0080 /* placeholder for custom variable */ |
#define | GUC_SUPERUSER_ONLY 0x0100 /* show only to superusers */ |
#define | GUC_IS_NAME 0x0200 /* limit string to NAMEDATALEN-1 */ |
#define | GUC_NOT_WHILE_SEC_REST 0x0400 /* can't set if security restricted */ |
#define | GUC_DISALLOW_IN_AUTO_FILE |
#define | GUC_UNIT_KB 0x1000 /* value is in kilobytes */ |
#define | GUC_UNIT_BLOCKS 0x2000 /* value is in blocks */ |
#define | GUC_UNIT_XBLOCKS 0x3000 /* value is in xlog blocks */ |
#define | GUC_UNIT_MB 0x4000 /* value is in megabytes */ |
#define | GUC_UNIT_BYTE 0x8000 /* value is in bytes */ |
#define | GUC_UNIT_MEMORY 0xF000 /* mask for size-related units */ |
#define | GUC_UNIT_MS 0x10000 /* value is in milliseconds */ |
#define | GUC_UNIT_S 0x20000 /* value is in seconds */ |
#define | GUC_UNIT_MIN 0x30000 /* value is in minutes */ |
#define | GUC_UNIT_TIME 0xF0000 /* mask for time-related units */ |
#define | GUC_EXPLAIN 0x100000 /* include in explain */ |
#define | GUC_UNIT (GUC_UNIT_MEMORY | GUC_UNIT_TIME) |
#define | GUC_check_errmsg |
#define | GUC_check_errdetail |
#define | GUC_check_errhint |
Typedefs | |
typedef struct ConfigVariable | ConfigVariable |
typedef bool(* | GucBoolCheckHook) (bool *newval, void **extra, GucSource source) |
typedef bool(* | GucIntCheckHook) (int *newval, void **extra, GucSource source) |
typedef bool(* | GucRealCheckHook) (double *newval, void **extra, GucSource source) |
typedef bool(* | GucStringCheckHook) (char **newval, void **extra, GucSource source) |
typedef bool(* | GucEnumCheckHook) (int *newval, void **extra, GucSource source) |
typedef void(* | GucBoolAssignHook) (bool newval, void *extra) |
typedef void(* | GucIntAssignHook) (int newval, void *extra) |
typedef void(* | GucRealAssignHook) (double newval, void *extra) |
typedef void(* | GucStringAssignHook) (const char *newval, void *extra) |
typedef void(* | GucEnumAssignHook) (int newval, void *extra) |
typedef const char *(* | GucShowHook) (void) |
Enumerations | |
enum | GucContext { PGC_INTERNAL, PGC_POSTMASTER, PGC_SIGHUP, PGC_SU_BACKEND, PGC_BACKEND, PGC_SUSET, PGC_USERSET } |
enum | GucSource { PGC_S_DEFAULT, PGC_S_DYNAMIC_DEFAULT, PGC_S_ENV_VAR, PGC_S_FILE, PGC_S_ARGV, PGC_S_GLOBAL, PGC_S_DATABASE, PGC_S_USER, PGC_S_DATABASE_USER, PGC_S_CLIENT, PGC_S_OVERRIDE, PGC_S_INTERACTIVE, PGC_S_TEST, PGC_S_SESSION } |
enum | GucAction { GUC_ACTION_SET, GUC_ACTION_LOCAL, GUC_ACTION_SAVE } |
Functions | |
bool | ParseConfigFile (const char *config_file, bool strict, const char *calling_file, int calling_lineno, int depth, int elevel, ConfigVariable **head_p, ConfigVariable **tail_p) |
bool | ParseConfigFp (FILE *fp, const char *config_file, int depth, int elevel, ConfigVariable **head_p, ConfigVariable **tail_p) |
bool | ParseConfigDirectory (const char *includedir, const char *calling_file, int calling_lineno, int depth, int elevel, ConfigVariable **head_p, ConfigVariable **tail_p) |
void | FreeConfigVariables (ConfigVariable *list) |
char * | DeescapeQuotedString (const char *s) |
void | SetConfigOption (const char *name, const char *value, GucContext context, GucSource source) |
void | DefineCustomBoolVariable (const char *name, const char *short_desc, const char *long_desc, bool *valueAddr, bool bootValue, GucContext context, int flags, GucBoolCheckHook check_hook, GucBoolAssignHook assign_hook, GucShowHook show_hook) |
void | DefineCustomIntVariable (const char *name, const char *short_desc, const char *long_desc, int *valueAddr, int bootValue, int minValue, int maxValue, GucContext context, int flags, GucIntCheckHook check_hook, GucIntAssignHook assign_hook, GucShowHook show_hook) |
void | DefineCustomRealVariable (const char *name, const char *short_desc, const char *long_desc, double *valueAddr, double bootValue, double minValue, double maxValue, GucContext context, int flags, GucRealCheckHook check_hook, GucRealAssignHook assign_hook, GucShowHook show_hook) |
void | DefineCustomStringVariable (const char *name, const char *short_desc, const char *long_desc, char **valueAddr, const char *bootValue, GucContext context, int flags, GucStringCheckHook check_hook, GucStringAssignHook assign_hook, GucShowHook show_hook) |
void | DefineCustomEnumVariable (const char *name, const char *short_desc, const char *long_desc, int *valueAddr, int bootValue, const struct config_enum_entry *options, GucContext context, int flags, GucEnumCheckHook check_hook, GucEnumAssignHook assign_hook, GucShowHook show_hook) |
void | EmitWarningsOnPlaceholders (const char *className) |
const char * | GetConfigOption (const char *name, bool missing_ok, bool restrict_privileged) |
const char * | GetConfigOptionResetString (const char *name) |
int | GetConfigOptionFlags (const char *name, bool missing_ok) |
void | ProcessConfigFile (GucContext context) |
void | InitializeGUCOptions (void) |
bool | SelectConfigFiles (const char *userDoption, const char *progname) |
void | ResetAllOptions (void) |
void | AtStart_GUC (void) |
int | NewGUCNestLevel (void) |
void | AtEOXact_GUC (bool isCommit, int nestLevel) |
void | BeginReportingGUCOptions (void) |
void | ReportChangedGUCOptions (void) |
void | ParseLongOption (const char *string, char **name, char **value) |
bool | parse_int (const char *value, int *result, int flags, const char **hintmsg) |
bool | parse_real (const char *value, double *result, int flags, const char **hintmsg) |
int | set_config_option (const char *name, const char *value, GucContext context, GucSource source, GucAction action, bool changeVal, int elevel, bool is_reload) |
void | AlterSystemSetConfigFile (AlterSystemStmt *altersysstmt) |
char * | GetConfigOptionByName (const char *name, const char **varname, bool missing_ok) |
void | GetConfigOptionByNum (int varnum, const char **values, bool *noshow) |
int | GetNumConfigOptions (void) |
void | SetPGVariable (const char *name, List *args, bool is_local) |
void | GetPGVariable (const char *name, DestReceiver *dest) |
TupleDesc | GetPGVariableResultDesc (const char *name) |
void | ExecSetVariableStmt (VariableSetStmt *stmt, bool isTopLevel) |
char * | ExtractSetVariableArgs (VariableSetStmt *stmt) |
void | ProcessGUCArray (ArrayType *array, GucContext context, GucSource source, GucAction action) |
ArrayType * | GUCArrayAdd (ArrayType *array, const char *name, const char *value) |
ArrayType * | GUCArrayDelete (ArrayType *array, const char *name) |
ArrayType * | GUCArrayReset (ArrayType *array) |
Size | EstimateGUCStateSpace (void) |
void | SerializeGUCState (Size maxsize, char *start_address) |
void | RestoreGUCState (void *gucstate) |
void | GUC_check_errcode (int sqlerrcode) |
bool | check_default_tablespace (char **newval, void **extra, GucSource source) |
bool | check_temp_tablespaces (char **newval, void **extra, GucSource source) |
void | assign_temp_tablespaces (const char *newval, void *extra) |
bool | check_search_path (char **newval, void **extra, GucSource source) |
void | assign_search_path (const char *newval, void *extra) |
bool | check_wal_buffers (int *newval, void **extra, GucSource source) |
void | assign_xlog_sync_method (int new_sync_method, void *extra) |
#define GUC_check_errdetail |
Definition at line 417 of file guc.h.
Referenced by addToArray(), check_backtrace_functions(), check_client_encoding(), check_datestyle(), check_default_table_access_method(), check_default_tablespace(), check_effective_io_concurrency(), check_huge_page_size(), check_log_destination(), check_log_stats(), check_log_timezone(), check_maintenance_io_concurrency(), check_max_stack_depth(), check_recovery_target(), check_recovery_target_name(), check_recovery_target_time(), check_recovery_target_timeline(), check_search_path(), check_stage_log_stats(), check_synchronous_standby_names(), check_temp_buffers(), check_temp_tablespaces(), check_timezone(), check_wal_consistency_checking(), and plpgsql_extra_checks_check_hook().
#define GUC_check_errhint |
Definition at line 421 of file guc.h.
Referenced by check_max_stack_depth(), check_XactIsoLevel(), and ParseTzFile().
#define GUC_check_errmsg |
Definition at line 413 of file guc.h.
Referenced by addToArray(), check_bonjour(), check_default_with_oids(), check_log_timezone(), check_role(), check_session_authorization(), check_ssl(), check_synchronous_standby_names(), check_timezone(), check_transaction_deferrable(), check_transaction_read_only(), check_XactIsoLevel(), load_tzoffsets(), ParseTzFile(), splitTzLine(), and validateTzEntry().
#define GUC_CUSTOM_PLACEHOLDER 0x0080 /* placeholder for custom variable */ |
Definition at line 212 of file guc.h.
Referenced by add_placeholder_variable(), define_custom_variable(), EmitWarningsOnPlaceholders(), and validate_option_array_item().
#define GUC_DISALLOW_IN_AUTO_FILE |
Definition at line 216 of file guc.h.
Referenced by AlterSystemSetConfigFile().
#define GUC_DISALLOW_IN_FILE 0x0040 /* can't set in postgresql.conf */ |
Definition at line 211 of file guc.h.
Referenced by AlterSystemSetConfigFile(), and displayStruct().
#define GUC_EXPLAIN 0x100000 /* include in explain */ |
Definition at line 231 of file guc.h.
Referenced by get_explain_guc_options().
#define GUC_IS_NAME 0x0200 /* limit string to NAMEDATALEN-1 */ |
Definition at line 214 of file guc.h.
Referenced by parse_and_validate_value().
#define GUC_LIST_INPUT 0x0001 /* input can be list format */ |
Definition at line 205 of file guc.h.
Referenced by _PG_init(), and flatten_set_variable_args().
#define GUC_LIST_QUOTE 0x0002 /* double-quote list elements */ |
Definition at line 206 of file guc.h.
Referenced by flatten_set_variable_args(), init_custom_variable(), and pg_get_functiondef().
#define GUC_NO_RESET_ALL 0x0008 /* exclude from RESET ALL */ |
Definition at line 208 of file guc.h.
Referenced by ResetAllOptions().
#define GUC_NO_SHOW_ALL 0x0004 /* exclude from SHOW ALL */ |
Definition at line 207 of file guc.h.
Referenced by add_placeholder_variable(), displayStruct(), get_explain_guc_options(), GetConfigOptionByNum(), and ShowAllGUCConfig().
#define GUC_NOT_IN_SAMPLE 0x0020 /* not in postgresql.conf.sample */ |
Definition at line 210 of file guc.h.
Referenced by _PG_init(), add_placeholder_variable(), and displayStruct().
#define GUC_NOT_WHILE_SEC_REST 0x0400 /* can't set if security restricted */ |
Definition at line 215 of file guc.h.
Referenced by set_config_option().
#define GUC_QUALIFIER_SEPARATOR '.' |
Definition at line 200 of file guc.h.
Referenced by EmitWarningsOnPlaceholders(), and find_option().
#define GUC_REPORT 0x0010 /* auto-report changes to client */ |
Definition at line 209 of file guc.h.
Referenced by AtEOXact_GUC(), BeginReportingGUCOptions(), ReportChangedGUCOptions(), ResetAllOptions(), and set_config_option().
#define GUC_SUPERUSER_ONLY 0x0100 /* show only to superusers */ |
Definition at line 213 of file guc.h.
Referenced by get_explain_guc_options(), GetConfigOption(), GetConfigOptionByName(), GetConfigOptionByNum(), GetConfigOptionResetString(), and ShowAllGUCConfig().
#define GUC_UNIT (GUC_UNIT_MEMORY | GUC_UNIT_TIME) |
Definition at line 233 of file guc.h.
Referenced by _ShowOption(), parse_int(), and parse_real().
#define GUC_UNIT_BLOCKS 0x2000 /* value is in blocks */ |
Definition at line 220 of file guc.h.
Referenced by get_config_unit_name().
#define GUC_UNIT_BYTE 0x8000 /* value is in bytes */ |
Definition at line 223 of file guc.h.
Referenced by get_config_unit_name().
#define GUC_UNIT_KB 0x1000 /* value is in kilobytes */ |
Definition at line 219 of file guc.h.
Referenced by get_config_unit_name().
#define GUC_UNIT_MB 0x4000 /* value is in megabytes */ |
Definition at line 222 of file guc.h.
Referenced by get_config_unit_name().
#define GUC_UNIT_MEMORY 0xF000 /* mask for size-related units */ |
Definition at line 224 of file guc.h.
Referenced by convert_int_from_base_unit(), convert_real_from_base_unit(), convert_to_base_unit(), get_config_unit_name(), parse_int(), and parse_real().
#define GUC_UNIT_MIN 0x30000 /* value is in minutes */ |
Definition at line 228 of file guc.h.
Referenced by get_config_unit_name().
#define GUC_UNIT_MS 0x10000 /* value is in milliseconds */ |
Definition at line 226 of file guc.h.
Referenced by _PG_init(), and get_config_unit_name().
#define GUC_UNIT_S 0x20000 /* value is in seconds */ |
Definition at line 227 of file guc.h.
Referenced by _PG_init(), and get_config_unit_name().
#define GUC_UNIT_TIME 0xF0000 /* mask for time-related units */ |
Definition at line 229 of file guc.h.
Referenced by get_config_unit_name().
#define GUC_UNIT_XBLOCKS 0x3000 /* value is in xlog blocks */ |
Definition at line 221 of file guc.h.
Referenced by get_config_unit_name().
#define MAX_KILOBYTES (INT_MAX / 1024) |
Definition at line 26 of file guc.h.
Referenced by get_hash_mem().
#define PG_AUTOCONF_FILENAME "postgresql.auto.conf" |
Definition at line 34 of file guc.h.
Referenced by AlterSystemSetConfigFile().
typedef struct ConfigVariable ConfigVariable |
typedef void(* GucRealAssignHook) (double newval, void *extra) |
typedef void(* GucStringAssignHook) (const char *newval, void *extra) |
enum GucAction |
enum GucContext |
enum GucSource |
Definition at line 105 of file guc.h.
void AlterSystemSetConfigFile | ( | AlterSystemStmt * | altersysstmt | ) |
Definition at line 8298 of file guc.c.
References AllocateFile(), BasicOpenFile(), close, config_generic::context, durable_rename(), elog, ereport, errcode(), errcode_for_file_access(), errmsg(), ERROR, ExtractSetVariableArgs(), find_option(), config_generic::flags, free, FreeConfigVariables(), FreeFile(), GUC_DISALLOW_IN_AUTO_FILE, GUC_DISALLOW_IN_FILE, infile(), VariableSetStmt::kind, LOG, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MAXPGPATH, name, VariableSetStmt::name, parse_and_validate_value(), ParseConfigFp(), PG_AUTOCONF_FILENAME, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, PGC_INTERNAL, PGC_S_FILE, PGC_STRING, replace_auto_config_value(), AlterSystemStmt::setstmt, snprintf, stat, config_var_val::stringval, superuser(), value, VAR_RESET, VAR_RESET_ALL, VAR_SET_DEFAULT, VAR_SET_VALUE, config_generic::vartype, and write_auto_conf_file().
Referenced by standard_ProcessUtility().
void assign_search_path | ( | const char * | newval, |
void * | extra | ||
) |
void assign_temp_tablespaces | ( | const char * | newval, |
void * | extra | ||
) |
Definition at line 1313 of file tablespace.c.
References temp_tablespaces_extra::numSpcs, SetTempTablespaces(), and temp_tablespaces_extra::tblSpcs.
void assign_xlog_sync_method | ( | int | new_sync_method, |
void * | extra | ||
) |
Definition at line 10524 of file xlog.c.
References ereport, errcode_for_file_access(), errmsg(), get_sync_bit(), MAXFNAMELEN, openLogFile, openLogSegNo, PANIC, pg_fsync(), pgstat_report_wait_end(), pgstat_report_wait_start(), sync_method, ThisTimeLineID, WAIT_EVENT_WAL_SYNC_METHOD_ASSIGN, wal_segment_size, XLogFileClose(), and XLogFileName.
void AtEOXact_GUC | ( | bool | isCommit, |
int | nestLevel | ||
) |
Definition at line 6008 of file guc.c.
References Assert, config_bool::assign_hook, config_int::assign_hook, config_real::assign_hook, config_string::assign_hook, config_enum::assign_hook, config_var_val::boolval, discard_stack_value(), config_var_val::enumval, config_var_value::extra, config_generic::extra, config_generic::flags, config_bool::gen, config_int::gen, config_real::gen, config_string::gen, config_enum::gen, GUC_LOCAL, GUC_NEEDS_REPORT, GUC_REPORT, GUC_SAVE, GUC_SET, GUC_SET_LOCAL, i, config_var_val::intval, guc_stack::masked, guc_stack::masked_scontext, guc_stack::nest_level, newval, num_guc_variables, pfree(), PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_S_SESSION, PGC_STRING, guc_stack::prev, guc_stack::prior, config_var_val::realval, guc_stack::scontext, config_generic::scontext, set_extra_field(), set_string_field(), guc_stack::source, config_generic::source, config_generic::stack, guc_stack::state, config_generic::status, config_var_val::stringval, config_var_value::val, config_bool::variable, config_int::variable, config_real::variable, config_string::variable, config_enum::variable, and config_generic::vartype.
Referenced by AbortSubTransaction(), AbortTransaction(), CommitSubTransaction(), CommitTransaction(), DefineIndex(), do_analyze_rel(), ExecCreateTableAs(), ExecRefreshMatView(), execute_extension_script(), fmgr_security_definer(), index_build(), PrepareTransaction(), ProcedureCreate(), reset_transmission_modes(), restoreLocalGucs(), RI_Initial_Check(), RI_PartitionRemove_Check(), vacuum_rel(), and validate_index().
void AtStart_GUC | ( | void | ) |
void BeginReportingGUCOptions | ( | void | ) |
Definition at line 6293 of file guc.c.
References DestRemote, config_generic::flags, FrontendProtocol, GUC_REPORT, i, num_guc_variables, PG_PROTOCOL_MAJOR, RecoveryInProgress(), ReportGUCOption(), and whereToSendOutput.
Referenced by PostgresMain().
Definition at line 1098 of file tablespace.c.
References ereport, errcode(), errmsg(), get_tablespace_oid(), GUC_check_errdetail, InvalidOid, IsTransactionState(), MyDatabaseId, NOTICE, OidIsValid, and PGC_S_TEST.
Definition at line 4273 of file namespace.c.
References GUC_check_errdetail, list_free(), pfree(), pstrdup(), and SplitIdentifierString().
Definition at line 1205 of file tablespace.c.
References ACL_CREATE, aclcheck_error(), ACLCHECK_OK, ereport, errcode(), errmsg(), get_tablespace_oid(), GetUserId(), GUC_check_errdetail, InvalidOid, IsTransactionState(), lfirst, list_free(), list_length(), malloc, MyDatabaseId, MyDatabaseTableSpace, NOTICE, temp_tablespaces_extra::numSpcs, OBJECT_TABLESPACE, offsetof, palloc(), pfree(), pg_tablespace_aclcheck(), PGC_S_INTERACTIVE, PGC_S_TEST, pstrdup(), SplitIdentifierString(), and temp_tablespaces_extra::tblSpcs.
Definition at line 5017 of file xlog.c.
References XLOGbuffers, and XLOGChooseNumBuffers().
char* DeescapeQuotedString | ( | const char * | s | ) |
void DefineCustomBoolVariable | ( | const char * | name, |
const char * | short_desc, | ||
const char * | long_desc, | ||
bool * | valueAddr, | ||
bool | bootValue, | ||
GucContext | context, | ||
int | flags, | ||
GucBoolCheckHook | check_hook, | ||
GucBoolAssignHook | assign_hook, | ||
GucShowHook | show_hook | ||
) |
Definition at line 8965 of file guc.c.
References config_bool::assign_hook, config_bool::boot_val, config_bool::check_hook, define_custom_variable(), config_bool::gen, init_custom_variable(), PGC_BOOL, config_bool::reset_val, config_bool::show_hook, and config_bool::variable.
Referenced by _PG_init().
void DefineCustomEnumVariable | ( | const char * | name, |
const char * | short_desc, | ||
const char * | long_desc, | ||
int * | valueAddr, | ||
int | bootValue, | ||
const struct config_enum_entry * | options, | ||
GucContext | context, | ||
int | flags, | ||
GucEnumCheckHook | check_hook, | ||
GucEnumAssignHook | assign_hook, | ||
GucShowHook | show_hook | ||
) |
Definition at line 9076 of file guc.c.
References config_enum::assign_hook, config_enum::boot_val, config_enum::check_hook, define_custom_variable(), config_enum::gen, init_custom_variable(), options, config_enum::options, PGC_ENUM, config_enum::reset_val, config_enum::show_hook, and config_enum::variable.
Referenced by _PG_init().
void DefineCustomIntVariable | ( | const char * | name, |
const char * | short_desc, | ||
const char * | long_desc, | ||
int * | valueAddr, | ||
int | bootValue, | ||
int | minValue, | ||
int | maxValue, | ||
GucContext | context, | ||
int | flags, | ||
GucIntCheckHook | check_hook, | ||
GucIntAssignHook | assign_hook, | ||
GucShowHook | show_hook | ||
) |
Definition at line 8991 of file guc.c.
References config_int::assign_hook, config_int::boot_val, config_int::check_hook, define_custom_variable(), config_int::gen, init_custom_variable(), config_int::max, config_int::min, PGC_INT, config_int::reset_val, config_int::show_hook, and config_int::variable.
Referenced by _PG_init().
void DefineCustomRealVariable | ( | const char * | name, |
const char * | short_desc, | ||
const char * | long_desc, | ||
double * | valueAddr, | ||
double | bootValue, | ||
double | minValue, | ||
double | maxValue, | ||
GucContext | context, | ||
int | flags, | ||
GucRealCheckHook | check_hook, | ||
GucRealAssignHook | assign_hook, | ||
GucShowHook | show_hook | ||
) |
Definition at line 9021 of file guc.c.
References config_real::assign_hook, config_real::boot_val, config_real::check_hook, define_custom_variable(), config_real::gen, init_custom_variable(), config_real::max, config_real::min, PGC_REAL, config_real::reset_val, config_real::show_hook, and config_real::variable.
Referenced by _PG_init().
void DefineCustomStringVariable | ( | const char * | name, |
const char * | short_desc, | ||
const char * | long_desc, | ||
char ** | valueAddr, | ||
const char * | bootValue, | ||
GucContext | context, | ||
int | flags, | ||
GucStringCheckHook | check_hook, | ||
GucStringAssignHook | assign_hook, | ||
GucShowHook | show_hook | ||
) |
Definition at line 9051 of file guc.c.
References config_string::assign_hook, config_string::boot_val, config_string::check_hook, define_custom_variable(), config_string::gen, init_custom_variable(), PGC_STRING, config_string::show_hook, and config_string::variable.
Referenced by _PG_init().
void EmitWarningsOnPlaceholders | ( | const char * | className | ) |
Definition at line 9104 of file guc.c.
References ereport, errcode(), errmsg(), config_generic::flags, GUC_CUSTOM_PLACEHOLDER, GUC_QUALIFIER_SEPARATOR, i, config_generic::name, num_guc_variables, and WARNING.
Referenced by _PG_init().
Size EstimateGUCStateSpace | ( | void | ) |
Definition at line 10398 of file guc.c.
References add_size(), estimate_variable_size(), i, and num_guc_variables.
Referenced by InitializeParallelDSM().
void ExecSetVariableStmt | ( | VariableSetStmt * | stmt, |
bool | isTopLevel | ||
) |
Definition at line 8512 of file guc.c.
References generate_unaccent_rules::action, DefElem::arg, VariableSetStmt::args, Assert, DefElem::defname, elog, ereport, errcode(), errmsg(), ERROR, ExtractSetVariableArgs(), GUC_ACTION_LOCAL, GUC_ACTION_SET, ImportSnapshot(), VariableSetStmt::is_local, IsInParallelMode(), VariableSetStmt::kind, lfirst, linitial_node, list_make1, VariableSetStmt::name, nodeTag, PGC_S_SESSION, PGC_SUSET, PGC_USERSET, ResetAllOptions(), set_config_option(), SetPGVariable(), strVal, superuser(), T_String, A_Const::val, VAR_RESET, VAR_RESET_ALL, VAR_SET_CURRENT, VAR_SET_DEFAULT, VAR_SET_MULTI, VAR_SET_VALUE, and WarnNoTransactionBlock().
Referenced by standard_ProcessUtility().
char* ExtractSetVariableArgs | ( | VariableSetStmt * | stmt | ) |
Definition at line 8636 of file guc.c.
References VariableSetStmt::args, flatten_set_variable_args(), GetConfigOptionByName(), VariableSetStmt::kind, VariableSetStmt::name, VAR_SET_CURRENT, and VAR_SET_VALUE.
Referenced by AlterSetting(), AlterSystemSetConfigFile(), ExecSetVariableStmt(), and update_proconfig_value().
void FreeConfigVariables | ( | ConfigVariable * | list | ) |
Referenced by AlterSystemSetConfigFile(), and parse_extension_control_file().
Definition at line 7903 of file guc.c.
References config_enum_lookup_by_value(), ereport, errcode(), errmsg(), ERROR, find_option(), config_generic::flags, GetUserId(), GUC_SUPERUSER_ONLY, is_member_of_role(), PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_STRING, snprintf, and config_generic::vartype.
Referenced by applyRemoteGucs(), be_tls_init(), and PostmasterMain().
char* GetConfigOptionByName | ( | const char * | name, |
const char ** | varname, | ||
bool | missing_ok | ||
) |
Definition at line 9365 of file guc.c.
References _ShowOption(), ereport, errcode(), errmsg(), ERROR, find_option(), config_generic::flags, GetUserId(), GUC_SUPERUSER_ONLY, is_member_of_role(), and config_generic::name.
Referenced by ExplainPrintSettings(), ExtractSetVariableArgs(), GetPGVariableResultDesc(), set_config_by_name(), show_config_by_name(), show_config_by_name_missing_ok(), and ShowGUCConfigOption().
void GetConfigOptionByNum | ( | int | varnum, |
const char ** | values, | ||
bool * | noshow | ||
) |
Definition at line 9402 of file guc.c.
References _, _ShowOption(), Assert, config_bool::boot_val, config_int::boot_val, config_real::boot_val, config_string::boot_val, config_enum::boot_val, config_enum_get_options(), config_enum_lookup_by_value(), config_generic::context, config_generic::flags, get_config_unit_name(), GetUserId(), config_generic::group, GUC_NO_SHOW_ALL, GUC_PENDING_RESTART, GUC_SUPERUSER_ONLY, is_member_of_role(), config_generic::long_desc, config_int::max, config_real::max, config_int::min, config_real::min, config_generic::name, PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_S_FILE, PGC_STRING, pstrdup(), config_bool::reset_val, config_int::reset_val, config_real::reset_val, config_string::reset_val, config_enum::reset_val, config_generic::short_desc, snprintf, config_generic::source, config_generic::sourcefile, config_generic::sourceline, config_generic::status, and config_generic::vartype.
Referenced by show_all_settings().
int GetConfigOptionFlags | ( | const char * | name, |
bool | missing_ok | ||
) |
Definition at line 8008 of file guc.c.
References ereport, errcode(), errmsg(), ERROR, find_option(), config_generic::flags, and WARNING.
Referenced by pg_get_functiondef().
const char* GetConfigOptionResetString | ( | const char * | name | ) |
Definition at line 7959 of file guc.c.
References config_enum_lookup_by_value(), ereport, errcode(), errmsg(), ERROR, find_option(), config_generic::flags, GetUserId(), GUC_SUPERUSER_ONLY, is_member_of_role(), PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_STRING, snprintf, and config_generic::vartype.
Referenced by check_datestyle().
int GetNumConfigOptions | ( | void | ) |
Definition at line 9630 of file guc.c.
References num_guc_variables.
Referenced by GucInfoMain(), and show_all_settings().
void GetPGVariable | ( | const char * | name, |
DestReceiver * | dest | ||
) |
Definition at line 9130 of file guc.c.
References guc_name_compare(), ShowAllGUCConfig(), and ShowGUCConfigOption().
Referenced by exec_replication_command(), and standard_ProcessUtility().
TupleDesc GetPGVariableResultDesc | ( | const char * | name | ) |
Definition at line 9139 of file guc.c.
References CreateTemplateTupleDesc(), GetConfigOptionByName(), guc_name_compare(), and TupleDescInitEntry().
Referenced by UtilityTupleDescriptor().
void GUC_check_errcode | ( | int | sqlerrcode | ) |
Definition at line 11093 of file guc.c.
References GUC_check_errcode_value.
Referenced by check_client_encoding(), check_default_with_oids(), check_role(), check_synchronous_standby_names(), check_transaction_deferrable(), check_transaction_read_only(), and check_XactIsoLevel().
Definition at line 10790 of file guc.c.
References ARR_DIMS, ARR_ELEMTYPE, ARR_LBOUND, ARR_NDIM, array_ref(), array_set(), Assert, construct_array(), CStringGetTextDatum, find_option(), i, config_generic::name, newval, psprintf(), TextDatumGetCString, validate_option_array_item(), and WARNING.
Referenced by AlterSetting(), and update_proconfig_value().
Definition at line 10870 of file guc.c.
References ARR_DIMS, array_ref(), array_set(), Assert, construct_array(), find_option(), i, config_generic::name, TextDatumGetCString, val, validate_option_array_item(), and WARNING.
Referenced by AlterSetting(), and update_proconfig_value().
Definition at line 10942 of file guc.c.
References ARR_DIMS, array_ref(), array_set(), construct_array(), i, pfree(), superuser(), TextDatumGetCString, val, and validate_option_array_item().
Referenced by AlterSetting().
void InitializeGUCOptions | ( | void | ) |
Definition at line 5392 of file guc.c.
References build_guc_variables(), i, InitializeGUCOptionsFromEnvironment(), InitializeOneGUCOption(), num_guc_variables, pg_timezone_initialize(), PGC_POSTMASTER, PGC_S_OVERRIDE, and SetConfigOption().
Referenced by AuxiliaryProcessMain(), BackendRun(), PostgresMain(), and PostmasterMain().
int NewGUCNestLevel | ( | void | ) |
Definition at line 5994 of file guc.c.
References GUCNestLevel.
Referenced by applyRemoteGucs(), DefineIndex(), do_analyze_rel(), ExecCreateTableAs(), ExecRefreshMatView(), execute_extension_script(), fmgr_security_definer(), index_build(), ProcedureCreate(), PushTransaction(), RI_Initial_Check(), RI_PartitionRemove_Check(), set_transmission_modes(), vacuum_rel(), and validate_index().
bool parse_int | ( | const char * | value, |
int * | result, | ||
int | flags, | ||
const char ** | hintmsg | ||
) |
Definition at line 6627 of file guc.c.
References convert_to_base_unit(), gettext_noop, GUC_UNIT, GUC_UNIT_MEMORY, memory_units_hint, time_units_hint, and val.
Referenced by parse_and_validate_value(), and parse_one_reloption().
bool parse_real | ( | const char * | value, |
double * | result, | ||
int | flags, | ||
const char ** | hintmsg | ||
) |
Definition at line 6717 of file guc.c.
References convert_to_base_unit(), GUC_UNIT, GUC_UNIT_MEMORY, memory_units_hint, time_units_hint, and val.
Referenced by parse_and_validate_value(), and parse_one_reloption().
bool ParseConfigDirectory | ( | const char * | includedir, |
const char * | calling_file, | ||
int | calling_lineno, | ||
int | depth, | ||
int | elevel, | ||
ConfigVariable ** | head_p, | ||
ConfigVariable ** | tail_p | ||
) |
bool ParseConfigFile | ( | const char * | config_file, |
bool | strict, | ||
const char * | calling_file, | ||
int | calling_lineno, | ||
int | depth, | ||
int | elevel, | ||
ConfigVariable ** | head_p, | ||
ConfigVariable ** | tail_p | ||
) |
bool ParseConfigFp | ( | FILE * | fp, |
const char * | config_file, | ||
int | depth, | ||
int | elevel, | ||
ConfigVariable ** | head_p, | ||
ConfigVariable ** | tail_p | ||
) |
Referenced by AlterSystemSetConfigFile(), and parse_extension_control_file().
void ParseLongOption | ( | const char * | string, |
char ** | name, | ||
char ** | value | ||
) |
Definition at line 10694 of file guc.c.
References AssertArg, FATAL, guc_malloc(), guc_strdup(), and strlcpy().
Referenced by AuxiliaryProcessMain(), PostmasterMain(), process_postgres_switches(), and ProcessGUCArray().
void ProcessConfigFile | ( | GucContext | context | ) |
Referenced by ApplyLauncherMain(), autoprewarm_main(), CheckpointWriteDelay(), do_autovacuum(), HandleAutoVacLauncherInterrupts(), HandleCheckpointerInterrupts(), HandleMainLoopInterrupts(), initialize_worker_spi(), LogicalRepApplyLoop(), pgarch_ArchiverCopyLoop(), pgarch_MainLoop(), PgstatCollectorMain(), PostgresMain(), SelectConfigFiles(), SIGHUP_handler(), StartupRereadConfig(), SysLoggerMain(), WalReceiverMain(), WalSndLoop(), WalSndWaitForWal(), and WalSndWriteData().
void ProcessGUCArray | ( | ArrayType * | array, |
GucContext | context, | ||
GucSource | source, | ||
GucAction | action | ||
) |
Definition at line 10732 of file guc.c.
References ARR_DIMS, ARR_ELEMTYPE, ARR_LBOUND, ARR_NDIM, array_ref(), Assert, ereport, errcode(), errmsg(), free, i, name, ParseLongOption(), pfree(), set_config_option(), TextDatumGetCString, value, and WARNING.
Referenced by ApplySetting(), fmgr_security_definer(), and ProcedureCreate().
void ReportChangedGUCOptions | ( | void | ) |
Definition at line 6341 of file guc.c.
References Assert, ERROR, find_option(), config_generic::flags, GUC_NEEDS_REPORT, GUC_REPORT, i, num_guc_variables, RecoveryInProgress(), ReportGUCOption(), and config_generic::status.
Referenced by PostgresMain().
void ResetAllOptions | ( | void | ) |
Definition at line 5790 of file guc.c.
References config_bool::assign_hook, config_int::assign_hook, config_real::assign_hook, config_string::assign_hook, config_enum::assign_hook, config_generic::context, config_generic::extra, config_generic::flags, config_bool::gen, config_int::gen, config_real::gen, config_string::gen, config_enum::gen, GUC_ACTION_SET, GUC_NEEDS_REPORT, GUC_NO_RESET_ALL, GUC_REPORT, i, num_guc_variables, PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_S_OVERRIDE, PGC_STRING, PGC_SUSET, PGC_USERSET, push_old_value(), config_bool::reset_extra, config_int::reset_extra, config_real::reset_extra, config_string::reset_extra, config_enum::reset_extra, config_generic::reset_scontext, config_generic::reset_source, config_bool::reset_val, config_int::reset_val, config_real::reset_val, config_string::reset_val, config_enum::reset_val, config_generic::scontext, set_extra_field(), set_string_field(), config_generic::source, config_generic::status, config_bool::variable, config_int::variable, config_real::variable, config_string::variable, config_enum::variable, and config_generic::vartype.
Referenced by DiscardAll(), and ExecSetVariableStmt().
void RestoreGUCState | ( | void * | gucstate | ) |
Definition at line 10620 of file guc.c.
References ErrorContextCallback::arg, ErrorContextCallback::callback, can_skip_gucvar(), ereport, errcode(), errmsg(), ERROR, error_context_stack, GUC_ACTION_SET, guc_restore_error_context_callback(), i, InitializeOneGUCOption(), num_guc_variables, ErrorContextCallback::previous, read_gucstate(), read_gucstate_binary(), set_config_option(), and set_config_sourcefile().
Referenced by ParallelWorkerMain().
bool SelectConfigFiles | ( | const char * | userDoption, |
const char * | progname | ||
) |
Definition at line 5615 of file guc.c.
References CONFIG_FILENAME, DataDir, FATAL, free, guc_malloc(), HBA_FILENAME, IDENT_FILENAME, make_absolute_path(), pg_timezone_abbrev_initialize(), PGC_POSTMASTER, PGC_S_OVERRIDE, ProcessConfigFile(), SetConfigOption(), SetDataDir(), sprintf, stat, strerror, and write_stderr.
Referenced by AuxiliaryProcessMain(), PostgresMain(), and PostmasterMain().
void SerializeGUCState | ( | Size | maxsize, |
char * | start_address | ||
) |
Definition at line 10540 of file guc.c.
References Assert, i, num_guc_variables, and serialize_variable().
Referenced by InitializeParallelDSM().
int set_config_option | ( | const char * | name, |
const char * | value, | ||
GucContext | context, | ||
GucSource | source, | ||
GucAction | action, | ||
bool | changeVal, | ||
int | elevel, | ||
bool | is_reload | ||
) |
Definition at line 7083 of file guc.c.
References config_bool::assign_hook, config_int::assign_hook, config_real::assign_hook, config_string::assign_hook, config_enum::assign_hook, config_var_val::boolval, config_bool::boot_val, config_int::boot_val, config_real::boot_val, config_string::boot_val, config_enum::boot_val, call_bool_check_hook(), call_enum_check_hook(), call_int_check_hook(), call_real_check_hook(), call_string_check_hook(), config_generic::context, DEBUG3, elog, config_var_val::enumval, ereport, errcode(), errmsg(), ERROR, config_var_value::extra, config_generic::extra, extra_field_used(), find_option(), config_generic::flags, free, config_bool::gen, config_int::gen, config_real::gen, config_string::gen, config_enum::gen, GUC_ACTION_SAVE, GUC_NEEDS_REPORT, GUC_NOT_WHILE_SEC_REST, GUC_PENDING_RESTART, GUC_REPORT, guc_strdup(), InLocalUserIdChange(), InSecurityRestrictedOperation(), config_var_val::intval, IsInParallelMode(), IsUnderPostmaster, LOG, newval, parse_and_validate_value(), PGC_BACKEND, PGC_BOOL, PGC_ENUM, PGC_INT, PGC_INTERNAL, PGC_POSTMASTER, PGC_REAL, PGC_S_CLIENT, PGC_S_DATABASE, PGC_S_DATABASE_USER, PGC_S_DEFAULT, PGC_S_FILE, PGC_S_GLOBAL, PGC_S_OVERRIDE, PGC_S_USER, PGC_SIGHUP, PGC_STRING, PGC_SU_BACKEND, PGC_SUSET, PGC_USERSET, guc_stack::prev, guc_stack::prior, push_old_value(), config_var_val::realval, config_bool::reset_extra, config_int::reset_extra, config_real::reset_extra, config_string::reset_extra, config_enum::reset_extra, config_generic::reset_scontext, config_generic::reset_source, config_bool::reset_val, config_int::reset_val, config_real::reset_val, config_string::reset_val, config_enum::reset_val, guc_stack::scontext, config_generic::scontext, set_extra_field(), set_string_field(), source, guc_stack::source, config_generic::source, config_generic::stack, config_generic::status, string_field_used(), config_var_val::stringval, config_var_value::val, config_bool::variable, config_int::variable, config_real::variable, config_string::variable, config_enum::variable, config_generic::vartype, and WARNING.
Referenced by _ShowOption(), applyRemoteGucs(), define_custom_variable(), DefineIndex(), ExecSetVariableStmt(), execute_extension_script(), parse_subscription_options(), ProcessGUCArray(), reapply_stacked_values(), RestoreGUCState(), RI_Initial_Check(), RI_PartitionRemove_Check(), set_config_by_name(), set_transmission_modes(), SetConfigOption(), SetPGVariable(), and validate_option_array_item().