24 const unsigned char *ptr = (
const unsigned char *)
name;
33 strchr(
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz"
34 "_0123456789", *ptr) != NULL)
78 for (current = space->
next; current; current = current->
next)
85 return current->
value;
139 pg_log_error(
"unrecognized value \"%s\" for \"%s\": Boolean expected",
166 numval = strtol(
value, &end, 0);
167 if (errno == 0 && *end ==
'\0' && end !=
value && numval == (
int) numval)
169 *result = (int) numval;
176 pg_log_error(
"invalid value \"%s\" for \"%s\": integer expected",
193 for (ptr = space->
next; ptr; ptr = ptr->
next)
228 for (previous = space, current = space->
next;
230 previous = current, current = current->
next)
259 current->
value = new_value;
265 if (new_value == NULL &&
292 previous->
next = current;
327 for (previous = space, current = space->
next;
329 previous = current, current = current->
next)
341 (void) (*ahook) (current->
value);
351 current->
value = NULL;
355 previous->
next = current;
359 (void) (*ahook) (current->
value);
374 for (current = space->
next; current; current = current->
next)
419 "Available values are: %s.",
#define IS_HIGHBIT_SET(ch)
#define Assert(condition)
char * pg_strdup(const char *in)
void * pg_malloc(size_t size)
volatile sig_atomic_t cancel_pressed
#define pg_log_error(...)
int pg_strcasecmp(const char *s1, const char *s2)
int pg_strncasecmp(const char *s1, const char *s2, size_t n)
static int cmp(const chr *x, const chr *y, size_t len)
VariableSubstituteHook substitute_hook
VariableAssignHook assign_hook
void PrintVariables(VariableSpace space)
bool DeleteVariable(VariableSpace space, const char *name)
void SetVariableHooks(VariableSpace space, const char *name, VariableSubstituteHook shook, VariableAssignHook ahook)
void PsqlVarEnumError(const char *name, const char *value, const char *suggestions)
bool ParseVariableBool(const char *value, const char *name, bool *result)
bool SetVariableBool(VariableSpace space, const char *name)
bool ParseVariableNum(const char *value, const char *name, int *result)
bool VariableHasHook(VariableSpace space, const char *name)
bool SetVariable(VariableSpace space, const char *name, const char *value)
static bool valid_variable_name(const char *name)
const char * GetVariable(VariableSpace space, const char *name)
VariableSpace CreateVariableSpace(void)
char *(* VariableSubstituteHook)(char *newval)
bool(* VariableAssignHook)(const char *newval)