|
PostgreSQL Source Code git master
|
#include "postgres_fe.h"#include <math.h>#include "common.h"#include "common/logging.h"#include "variables.h"
Go to the source code of this file.
Functions | |
| static bool | valid_variable_name (const char *name) |
| VariableSpace | CreateVariableSpace (void) |
| const char * | GetVariable (VariableSpace space, const char *name) |
| bool | ParseVariableBool (const char *value, const char *name, bool *result) |
| bool | ParseVariableNum (const char *value, const char *name, int *result) |
| bool | ParseVariableDouble (const char *value, const char *name, double *result, double min, double max) |
| void | PrintVariables (VariableSpace space) |
| bool | SetVariable (VariableSpace space, const char *name, const char *value) |
| void | SetVariableHooks (VariableSpace space, const char *name, VariableSubstituteHook shook, VariableAssignHook ahook) |
| bool | VariableHasHook (VariableSpace space, const char *name) |
| bool | SetVariableBool (VariableSpace space, const char *name) |
| bool | DeleteVariable (VariableSpace space, const char *name) |
| void | PsqlVarEnumError (const char *name, const char *value, const char *suggestions) |
| VariableSpace CreateVariableSpace | ( | void | ) |
Definition at line 53 of file variables.c.
References _variable::assign_hook, _variable::name, _variable::next, pg_malloc(), _variable::substitute_hook, and _variable::value.
Referenced by EstablishVariableSpace().
| bool DeleteVariable | ( | VariableSpace | space, |
| const char * | name | ||
| ) |
Definition at line 474 of file variables.c.
References name, and SetVariable().
Referenced by parse_psql_options().
| const char * GetVariable | ( | VariableSpace | space, |
| const char * | name | ||
| ) |
Definition at line 73 of file variables.c.
References cmp(), name, _variable::name, _variable::next, and _variable::value.
Referenced by get_prompt(), initializeInput(), and psql_get_variable().
| bool ParseVariableBool | ( | const char * | value, |
| const char * | name, | ||
| bool * | result | ||
| ) |
Definition at line 109 of file variables.c.
References len, name, pg_log_error, pg_strcasecmp(), pg_strncasecmp(), and value.
Referenced by autocommit_hook(), do_pset(), echo_hidden_hook(), exec_command_connect(), exec_command_timing(), hide_compression_hook(), hide_tableam_hook(), is_true_boolean_expression(), on_error_rollback_hook(), on_error_stop_hook(), quiet_hook(), show_all_results_hook(), singleline_hook(), and singlestep_hook().
| bool ParseVariableDouble | ( | const char * | value, |
| const char * | name, | ||
| double * | result, | ||
| double | min, | ||
| double | max | ||
| ) |
Definition at line 195 of file variables.c.
References name, pg_log_error, and value.
Referenced by watch_interval_hook().
| bool ParseVariableNum | ( | const char * | value, |
| const char * | name, | ||
| int * | result | ||
| ) |
Definition at line 158 of file variables.c.
References name, pg_log_error, and value.
Referenced by do_pset(), fetch_count_hook(), histsize_hook(), ignoreeof_hook(), and ignoreeof_substitute_hook().
| void PrintVariables | ( | VariableSpace | space | ) |
Definition at line 256 of file variables.c.
References cancel_pressed, _variable::name, _variable::next, printf, and _variable::value.
Referenced by exec_command_set().
| void PsqlVarEnumError | ( | const char * | name, |
| const char * | value, | ||
| const char * | suggestions | ||
| ) |
Definition at line 486 of file variables.c.
References name, pg_log_error, and value.
Referenced by comp_keyword_case_hook(), do_pset(), echo_hidden_hook(), echo_hook(), histcontrol_hook(), on_error_rollback_hook(), show_context_hook(), and verbosity_hook().
| bool SetVariable | ( | VariableSpace | space, |
| const char * | name, | ||
| const char * | value | ||
| ) |
Definition at line 281 of file variables.c.
References _variable::assign_hook, cmp(), free, name, _variable::name, _variable::next, pg_free(), pg_log_error, pg_malloc(), pg_strdup(), _variable::substitute_hook, valid_variable_name(), _variable::value, and value.
Referenced by DeleteVariable(), do_lo_import(), exec_command_encoding(), exec_command_getenv(), exec_command_prompt(), exec_command_set(), exec_command_unset(), ExecQueryAndProcessResults(), main(), parse_psql_options(), PrintQueryStatus(), SendQuery(), SetPipelineVariables(), SetResultVariables(), SetShellResultVariables(), SetVariableBool(), StoreQueryTuple(), SyncVariables(), and UnsyncVariables().
| bool SetVariableBool | ( | VariableSpace | space, |
| const char * | name | ||
| ) |
Definition at line 462 of file variables.c.
References name, and SetVariable().
Referenced by main(), and parse_psql_options().
| void SetVariableHooks | ( | VariableSpace | space, |
| const char * | name, | ||
| VariableSubstituteHook | shook, | ||
| VariableAssignHook | ahook | ||
| ) |
Definition at line 384 of file variables.c.
References _variable::assign_hook, cmp(), name, _variable::name, _variable::next, pg_malloc(), pg_strdup(), _variable::substitute_hook, valid_variable_name(), and _variable::value.
Referenced by EstablishVariableSpace().
|
static |
Definition at line 24 of file variables.c.
References IS_HIGHBIT_SET, and name.
Referenced by SetVariable(), and SetVariableHooks().
| bool VariableHasHook | ( | VariableSpace | space, |
| const char * | name | ||
| ) |
Definition at line 437 of file variables.c.
References Assert(), _variable::assign_hook, cmp(), name, _variable::name, _variable::next, and _variable::substitute_hook.
Referenced by StoreQueryTuple().