MobilityDB 1.3
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
pgtz.c File Reference
#include "postgres.h"
#include <ctype.h>
#include <fcntl.h>
#include <time.h>
#include <dirent.h>
#include <common/hashfn.h>
#include <sys/stat.h>
#include "utils/timestamp_def.h"
#include "pgtz.h"
#include "../../include/meos.h"
#include <lib/simplehash.h>

Data Structures

struct  tzentry
 Structure to represent the timezone cache hash table, which extends the ENTRY structure used by hsearch https://man7.org/linux/man-pages/man3/hsearch.3.html with the additional field status required by simplehash More...
 

Macros

#define SH_DECLARE
 
#define SH_DEFINE
 
#define SH_DESTROY   tzcache_destroy(tzcache)
 
#define SH_ELEMENT_TYPE   tzentry
 
#define SH_EQUAL(tb, a, b)   (strcmp(a, b) == 0)
 
#define SH_HASH_KEY(tb, key)   hash_string_pointer(key)
 
#define SH_KEY   key
 
#define SH_KEY_TYPE   const char *
 
#define SH_PREFIX   tzcache
 
#define SH_RAW_ALLOCATOR   palloc0
 
#define SH_SCOPE   static inline
 
#define TZCACHE_INITIAL_SIZE   32
 

Functions

static uint32 hash_string_pointer (const char *s)
 
static bool init_timezone_hashtable (void)
 
void meos_finalize_timezone (void)
 
void meos_initialize_timezone (const char *tz_str)
 
int pg_open_tzfile (const char *name, char *canonname)
 
static const char * pg_TZDIR (void)
 
pg_tzpg_tzset (const char *name)
 
pg_tzpg_tzset_offset (long gmtoffset)
 
struct dirent * ReadDir (DIR *dir, const char *dirname)
 
static bool scan_directory_ci (const char *dirname, const char *fname, int fnamelen, char *canonname, int canonnamelen)
 
const char * select_default_timezone (const char *share_path)
 
static void tzcache_my_destroy (tzcache_hash *tb)
 Destroy function to free the memory allocated for the hash table. More...
 

Variables

pg_tzsession_timezone = NULL
 
static tzcache_hash * timezone_cache = NULL