35#define WHITESPACE " \t\n\r"
61 GUC_check_errmsg(
"time zone abbreviation \"%s\" is too long (maximum %d characters) in time zone file \"%s\", line %d",
73 GUC_check_errmsg(
"time zone offset %d is out of range in time zone file \"%s\", line %d",
82 for (p = (
unsigned char *)
tzentry->abbrev; *p; p++)
113 GUC_check_errmsg(
"missing time zone abbreviation in time zone file \"%s\", line %d",
122 GUC_check_errmsg(
"missing time zone offset in time zone file \"%s\", line %d",
128 if (
isdigit((
unsigned char) *offset) || *offset ==
'+' || *offset ==
'-')
134 GUC_check_errmsg(
"invalid number for time zone offset in time zone file \"%s\", line %d",
206 int mid = (low + high) >> 1;
240 GUC_check_errdetail(
"Entry in time zone file \"%s\", line %d, conflicts with entry in file \"%s\", line %d.",
287 bool override =
false;
298 if (!
isalpha((
unsigned char) *p))
342 GUC_check_errhint(
"This may indicate an incomplete PostgreSQL installation, or that the file \"%s\" has been moved away from its proper location.",
386 while (*line &&
isspace((
unsigned char) *line))
403 GUC_check_errmsg(
"@INCLUDE without file name in time zone file \"%s\", line %d",
TimeZoneAbbrevTable * ConvertTimeZoneAbbrevs(struct tzEntry *abbrevs, int n)
DIR * AllocateDir(const char *dirname)
FILE * AllocateFile(const char *name, const char *mode)
#define palloc_array(type, count)
char my_exec_path[MAXPGPATH]
#define GUC_check_errdetail
#define GUC_check_errhint
char * pstrdup(const char *in)
void * repalloc(void *pointer, Size size)
MemoryContext CurrentMemoryContext
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_SMALL_SIZES
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
void get_share_path(const char *my_exec_path, char *ret_path)
int pg_strcasecmp(const char *s1, const char *s2)
unsigned char pg_tolower(unsigned char ch)
int pg_strncasecmp(const char *s1, const char *s2, size_t n)
static int cmp(const chr *x, const chr *y, size_t len)
static bool validateTzEntry(tzEntry *tzentry)
static bool splitTzLine(const char *filename, int lineno, char *line, tzEntry *tzentry)
static int addToArray(tzEntry **base, int *arraysize, int n, tzEntry *entry, bool override)
TimeZoneAbbrevTable * load_tzoffsets(const char *filename)
static int ParseTzFile(const char *filename, int depth, tzEntry **base, int *arraysize, int n)