summaryrefslogtreecommitdiff
path: root/src/include/utils/timestamp.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-08-18 21:23:21 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-08-18 21:23:21 +0000
commit977c77759c1d602237896d91d6403e5adc03ffe1 (patch)
tree6c0262ae82e1e86ec81313b542a2af83a8bcd0ef /src/include/utils/timestamp.h
parent55ea948feb890b193754f3423b41c6929e571208 (diff)
Fix overflow for INTERVAL 'x ms' where x is more than a couple million,
and integer datetimes are in use. Per bug report from Hubert Depesz Lubaczewski. Alex Hunsaker
Diffstat (limited to 'src/include/utils/timestamp.h')
-rw-r--r--src/include/utils/timestamp.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h
index 291de5cdeac..ab74d8e9cf0 100644
--- a/src/include/utils/timestamp.h
+++ b/src/include/utils/timestamp.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.80 2009/06/11 14:49:13 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.80.2.1 2009/08/18 21:23:21 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -39,6 +39,8 @@
* TimeOffset and fsec_t are convenience typedefs for temporary variables
* that are of different types in the two cases. Do not use fsec_t in values
* stored on-disk, since it is not the same size in both implementations.
+ * Also, fsec_t is only meant for *fractional* seconds; beware of overflow
+ * if the value you need to store could be many seconds.
*/
#ifdef HAVE_INT64_TIMESTAMP