summaryrefslogtreecommitdiff
path: root/src/include/utils/datetime.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils/datetime.h')
-rw-r--r--src/include/utils/datetime.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index 11672458f4c..9911d207936 100644
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -20,7 +20,9 @@
#include <math.h>
#include "utils/timestamp.h"
-#include "utils/tzparser.h"
+
+/* this struct is declared in utils/tzparser.h: */
+struct tzEntry;
/* ----------------------------------------------------------------
@@ -203,6 +205,13 @@ typedef struct
char value; /* this may be unsigned, alas */
} datetkn;
+/* one of its uses is in tables of time zone abbreviations */
+typedef struct TimeZoneAbbrevTable
+{
+ int numabbrevs;
+ datetkn abbrevs[1]; /* VARIABLE LENGTH ARRAY */
+} TimeZoneAbbrevTable;
+
/* FMODULO()
* Macro to replace modf(), which is broken on some platforms.
@@ -317,7 +326,10 @@ extern int DecodeUnits(int field, char *lowtoken, int *val);
extern int j2day(int jd);
extern bool CheckDateTokenTables(void);
-extern void InstallTimeZoneAbbrevs(tzEntry *abbrevs, int n);
+
+extern void ConvertTimeZoneAbbrevs(TimeZoneAbbrevTable *tbl,
+ struct tzEntry *abbrevs, int n);
+extern void InstallTimeZoneAbbrevs(TimeZoneAbbrevTable *tbl);
extern Datum pg_timezone_abbrevs(PG_FUNCTION_ARGS);
extern Datum pg_timezone_names(PG_FUNCTION_ARGS);