summaryrefslogtreecommitdiff
path: root/src/include/pgtime.h
diff options
context:
space:
mode:
authorTom Lane2011-09-09 21:59:11 +0000
committerTom Lane2011-09-09 21:59:11 +0000
commitca4af308c32d03db5fbacb54d6e583ceb904f268 (patch)
tree352fb06319a1c8e3efd78acaca9cc8b8ff0e7eda /src/include/pgtime.h
parenta7801b62f21bd051444bd1119cd3745ecc8e14ec (diff)
Simplify handling of the timezone GUC by making initdb choose the default.
We were doing some amazingly complicated things in order to avoid running the very expensive identify_system_timezone() procedure during GUC initialization. But there is an obvious fix for that, which is to do it once during initdb and have initdb install the system-specific default into postgresql.conf, as it already does for most other GUC variables that need system-environment-dependent defaults. This means that the timezone (and log_timezone) settings no longer have any magic behavior in the server. Per discussion.
Diffstat (limited to 'src/include/pgtime.h')
-rw-r--r--src/include/pgtime.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/include/pgtime.h b/src/include/pgtime.h
index e73cfa51a4d..9dc794026c1 100644
--- a/src/include/pgtime.h
+++ b/src/include/pgtime.h
@@ -40,6 +40,11 @@ struct pg_tm
typedef struct pg_tz pg_tz;
typedef struct pg_tzenum pg_tzenum;
+/* Maximum length of a timezone name (not including trailing null) */
+#define TZ_STRLEN_MAX 255
+
+/* these functions are in localtime.c */
+
extern struct pg_tm *pg_localtime(const pg_time_t *timep, const pg_tz *tz);
extern struct pg_tm *pg_gmtime(const pg_time_t *timep);
extern int pg_next_dst_boundary(const pg_time_t *timep,
@@ -52,22 +57,20 @@ extern int pg_next_dst_boundary(const pg_time_t *timep,
extern size_t pg_strftime(char *s, size_t max, const char *format,
const struct pg_tm * tm);
-extern void pg_timezone_pre_initialize(void);
-extern void pg_timezone_initialize(void);
-extern pg_tz *pg_tzset(const char *tzname);
-extern bool tz_acceptable(pg_tz *tz);
extern bool pg_get_timezone_offset(const pg_tz *tz, long int *gmtoff);
extern const char *pg_get_timezone_name(pg_tz *tz);
+extern bool pg_tz_acceptable(pg_tz *tz);
-extern pg_tzenum *pg_tzenumerate_start(void);
-extern pg_tz *pg_tzenumerate_next(pg_tzenum *dir);
-extern void pg_tzenumerate_end(pg_tzenum *dir);
+/* these functions and variables are in pgtz.c */
extern pg_tz *session_timezone;
extern pg_tz *log_timezone;
-extern pg_tz *gmt_timezone;
-/* Maximum length of a timezone name (not including trailing null) */
-#define TZ_STRLEN_MAX 255
+extern void pg_timezone_initialize(void);
+extern pg_tz *pg_tzset(const char *tzname);
+
+extern pg_tzenum *pg_tzenumerate_start(void);
+extern pg_tz *pg_tzenumerate_next(pg_tzenum *dir);
+extern void pg_tzenumerate_end(pg_tzenum *dir);
#endif /* _PGTIME_H */