PostgreSQL Source Code git master
|
#include "postgres.h"
#include <ctype.h>
#include <unistd.h>
#include "common/file_utils.h"
#include "guc_internal.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "storage/fd.h"
#include "utils/conffiles.h"
#include "utils/memutils.h"
Go to the source code of this file.
Macros | |
#define | fprintf(file, fmt, msg) GUC_flex_fatal(msg) |
Enumerations | |
enum | { GUC_ID = 1 , GUC_STRING = 2 , GUC_INTEGER = 3 , GUC_REAL = 4 , GUC_EQUALS = 5 , GUC_UNQUOTED_STRING = 6 , GUC_QUALIFIED_ID = 7 , GUC_EOL = 99 , GUC_ERROR = 100 } |
Functions | |
static void | FreeConfigVariable (ConfigVariable *item) |
static int | GUC_flex_fatal (const char *msg) |
int | yylex (yyscan_t yyscanner) |
void | ProcessConfigFile (GucContext context) |
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) |
void | record_config_file_error (const char *errmsg, const char *config_file, int lineno, 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) |
Variables | |
static unsigned int | ConfigFileLineno |
static const char * | GUC_flex_fatal_errmsg |
static sigjmp_buf * | GUC_flex_fatal_jmp |
#define fprintf | ( | file, | |
fmt, | |||
msg | |||
) | GUC_flex_fatal(msg) |
Definition at line 33 of file guc-file.l.
anonymous enum |
Enumerator | |
---|---|
GUC_ID | |
GUC_STRING | |
GUC_INTEGER | |
GUC_REAL | |
GUC_EQUALS | |
GUC_UNQUOTED_STRING | |
GUC_QUALIFIED_ID | |
GUC_EOL | |
GUC_ERROR |
Definition at line 35 of file guc-file.l.
char * DeescapeQuotedString | ( | const char * | s | ) |
Definition at line 661 of file guc-file.l.
References Assert, i, j, len, and palloc().
Referenced by ParseConfigFp().
|
static |
Definition at line 635 of file guc-file.l.
References ConfigVariable::errmsg, ConfigVariable::filename, ConfigVariable::name, pfree(), and ConfigVariable::value.
Referenced by FreeConfigVariables().
void FreeConfigVariables | ( | ConfigVariable * | list | ) |
Definition at line 617 of file guc-file.l.
References FreeConfigVariable(), sort-test::list, next, and ConfigVariable::next.
Referenced by AlterSystemSetConfigFile(), and parse_extension_control_file().
|
static |
Definition at line 311 of file guc-file.l.
References GUC_flex_fatal_errmsg, and GUC_flex_fatal_jmp.
bool ParseConfigDirectory | ( | const char * | includedir, |
const char * | calling_file, | ||
int | calling_lineno, | ||
int | depth, | ||
int | elevel, | ||
ConfigVariable ** | head_p, | ||
ConfigVariable ** | tail_p | ||
) |
Definition at line 581 of file guc-file.l.
References GetConfFilesInDir(), i, ParseConfigFile(), and record_config_file_error().
Referenced by ParseConfigFp().
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 | ||
) |
Definition at line 175 of file guc-file.l.
References AbsoluteConfigLocation(), AllocateFile(), cleanup(), CONF_FILE_MAX_DEPTH, config_file, ereport, errcode(), errcode_for_file_access(), errmsg(), FreeFile(), LOG, ParseConfigFp(), pfree(), psprintf(), and record_config_file_error().
Referenced by ParseConfigDirectory(), ParseConfigFp(), and ProcessConfigFileInternal().
bool ParseConfigFp | ( | FILE * | fp, |
const char * | config_file, | ||
int | depth, | ||
int | elevel, | ||
ConfigVariable ** | head_p, | ||
ConfigVariable ** | tail_p | ||
) |
Definition at line 350 of file guc-file.l.
References ConfigVariable::applied, cleanup(), config_file, ConfigFileLineno, DEBUG1, DeescapeQuotedString(), elog, ereport, errcode(), errmsg(), ConfigVariable::errmsg, ConfigVariable::filename, GUC_EOL, GUC_EQUALS, GUC_flex_fatal_errmsg, GUC_flex_fatal_jmp, GUC_ID, GUC_INTEGER, guc_name_compare(), GUC_QUALIFIED_ID, GUC_REAL, GUC_STRING, GUC_UNQUOTED_STRING, ConfigVariable::ignore, ConfigVariable::name, ConfigVariable::next, palloc(), ParseConfigDirectory(), ParseConfigFile(), pfree(), pstrdup(), record_config_file_error(), ConfigVariable::sourceline, token, ConfigVariable::value, and yylex().
Referenced by AlterSystemSetConfigFile(), parse_extension_control_file(), and ParseConfigFile().
void ProcessConfigFile | ( | GucContext | context | ) |
Definition at line 120 of file guc-file.l.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, CurrentMemoryContext, DEBUG2, IsUnderPostmaster, LOG, MemoryContextDelete(), MemoryContextSwitchTo(), PGC_POSTMASTER, PGC_SIGHUP, and ProcessConfigFileInternal().
Referenced by ApplyLauncherMain(), autoprewarm_main(), CheckpointWriteDelay(), do_autovacuum(), HandleAutoVacLauncherInterrupts(), HandleCheckpointerInterrupts(), HandleMainLoopInterrupts(), HandlePgArchInterrupts(), HandleWalSummarizerInterrupts(), LogicalRepApplyLoop(), PostgresMain(), process_pm_reload_request(), ProcessParallelApplyInterrupts(), ProcessPendingWrites(), SelectConfigFiles(), slotsync_reread_config(), StartupRereadConfig(), SysLoggerMain(), vacuum_delay_point(), WaitForStandbyConfirmation(), WalReceiverMain(), WalSndLoop(), WalSndWaitForWal(), and worker_spi_main().
void record_config_file_error | ( | const char * | errmsg, |
const char * | config_file, | ||
int | lineno, | ||
ConfigVariable ** | head_p, | ||
ConfigVariable ** | tail_p | ||
) |
Definition at line 278 of file guc-file.l.
References ConfigVariable::applied, config_file, errmsg(), ConfigVariable::errmsg, ConfigVariable::filename, ConfigVariable::ignore, ConfigVariable::name, ConfigVariable::next, palloc(), pstrdup(), ConfigVariable::sourceline, and ConfigVariable::value.
Referenced by ParseConfigDirectory(), ParseConfigFile(), ParseConfigFp(), and ProcessConfigFileInternal().
int yylex | ( | yyscan_t | yyscanner | ) |
Definition at line 91 of file guc-file.l.
Referenced by ParseConfigFp().
|
static |
Definition at line 48 of file guc-file.l.
Referenced by ParseConfigFp().
|
static |
Definition at line 49 of file guc-file.l.
Referenced by GUC_flex_fatal(), and ParseConfigFp().
|
static |
Definition at line 50 of file guc-file.l.
Referenced by GUC_flex_fatal(), and ParseConfigFp().