aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/timestamp.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-02-17 02:09:32 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-02-17 02:09:32 +0000
commitcd004067742ee16ee63e55abfb4acbd5f09fbaab (patch)
tree62995d45f55faf5f5cdddc791d4d83d3de495b03 /src/include/utils/timestamp.h
parentee7a6770f607e9e7f0e1b29dc25a7b7d63cb7940 (diff)
downloadpostgresql-cd004067742ee16ee63e55abfb4acbd5f09fbaab.tar.gz
postgresql-cd004067742ee16ee63e55abfb4acbd5f09fbaab.zip
Replace time_t with pg_time_t (same values, but always int64) in on-disk
data structures and backend internal APIs. This solves problems we've seen recently with inconsistent layout of pg_control between machines that have 32-bit time_t and those that have already migrated to 64-bit time_t. Also, we can get out from under the problem that Windows' Unix-API emulation is not consistent about the width of time_t. There are a few remaining places where local time_t variables are used to hold the current or recent result of time(NULL). I didn't bother changing these since they do not affect any cross-module APIs and surely all platforms will have 64-bit time_t before overflow becomes an actual risk. time_t should be avoided for anything visible to extension modules, however.
Diffstat (limited to 'src/include/utils/timestamp.h')
-rw-r--r--src/include/utils/timestamp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h
index 1f73a2a081a..cc224aa147a 100644
--- a/src/include/utils/timestamp.h
+++ b/src/include/utils/timestamp.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.74 2008/01/23 21:26:13 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.75 2008/02/17 02:09:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -310,8 +310,8 @@ extern bool TimestampDifferenceExceeds(TimestampTz start_time,
TimestampTz stop_time,
int msec);
-extern TimestampTz time_t_to_timestamptz(time_t tm);
-extern time_t timestamptz_to_time_t(TimestampTz t);
+extern TimestampTz time_t_to_timestamptz(pg_time_t tm);
+extern pg_time_t timestamptz_to_time_t(TimestampTz t);
extern const char *timestamptz_to_str(TimestampTz t);