mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Remove hard-wired lists of timezone abbreviations in favor of providing
configuration files that can be altered by a DBA. The australian_timezones GUC setting disappears, replaced by a timezone_abbreviations setting (set this to 'Australia' to get the effect of australian_timezones). The list of zone names defined by default has undergone a bit of cleanup, too. Documentation still needs some work --- in particular, should we fix Table B-4, or just get rid of it? Joachim Wieland, with some editorializing by moi.
This commit is contained in:
35
src/include/utils/tzparser.h
Normal file
35
src/include/utils/tzparser.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* tzparser.h
|
||||
* Timezone offset file parsing definitions.
|
||||
*
|
||||
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/tzparser.h,v 1.1 2006/07/25 03:51:22 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef TZPARSER_H
|
||||
#define TZPARSER_H
|
||||
|
||||
/*
|
||||
* The result of parsing a timezone configuration file is an array of
|
||||
* these structs, in order by abbrev. We export this because datetime.c
|
||||
* needs it.
|
||||
*/
|
||||
typedef struct tzEntry
|
||||
{
|
||||
/* the actual data: TZ abbrev (downcased), offset, DST flag */
|
||||
char *abbrev;
|
||||
int offset; /* in seconds from UTC */
|
||||
bool is_dst;
|
||||
/* source information (for error messages) */
|
||||
int lineno;
|
||||
const char *filename;
|
||||
} tzEntry;
|
||||
|
||||
|
||||
extern bool load_tzoffsets(const char *filename, bool doit, int elevel);
|
||||
|
||||
#endif /* TZPARSER_H */
|
Reference in New Issue
Block a user