summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-06-15 00:34:11 +0000
committerBruce Momjian <bruce@momjian.us>2005-06-15 00:34:11 +0000
commit0851a6fbc77e7f1762a2a94d370492f03450e922 (patch)
tree13fc854cd326b9d6cc118fc989a6aff5a3e60990 /src/include
parent5955945828d96511798c3edf158ff2c341257d19 (diff)
This patch makes it possible to use the full set of timezones when doing
"AT TIME ZONE", and not just the shorlist previously available. For example: SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; works fine now. It will also obey whatever DST rules were in effect at just that date, which the previous implementation did not. It also supports the AT TIME ZONE on the timetz datatype. The whole handling of DST is a bit bogus there, so I chose to make it use whatever DST rules are in effect at the time of executig the query. not sure if anybody is actuallyi *using* timetz though, it seems pretty unpredictable just because of this... Magnus Hagander
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pgtime.h6
-rw-r--r--src/include/utils/timestamp.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/include/pgtime.h b/src/include/pgtime.h
index b3322234e19..c36a871fb33 100644
--- a/src/include/pgtime.h
+++ b/src/include/pgtime.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/include/pgtime.h,v 1.7 2005/04/19 03:13:59 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/pgtime.h,v 1.8 2005/06/15 00:34:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,4 +57,8 @@ extern bool tz_acceptable(pg_tz *tz);
extern const char *pg_get_timezone_name(pg_tz *tz);
extern pg_tz *global_timezone;
+
+/* Maximum length of a timezone name */
+#define TZ_STRLEN_MAX 255
+
#endif /* _PGTIME_H */
diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h
index 782b75ec8df..7475dacbe7c 100644
--- a/src/include/utils/timestamp.h
+++ b/src/include/utils/timestamp.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.44 2005/06/14 21:04:42 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.45 2005/06/15 00:34:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -264,7 +264,7 @@ extern TimestampTz StartTime;
extern int tm2timestamp(struct pg_tm * tm, fsec_t fsec, int *tzp, Timestamp *dt);
extern int timestamp2tm(Timestamp dt, int *tzp, struct pg_tm * tm,
- fsec_t *fsec, char **tzn);
+ fsec_t *fsec, char **tzn, pg_tz *attimezone);
extern void dt2time(Timestamp dt, int *hour, int *min, int *sec, fsec_t *fsec);
extern int interval2tm(Interval span, struct pg_tm * tm, fsec_t *fsec);