aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/date.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils/date.h')
-rw-r--r--src/include/utils/date.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/include/utils/date.h b/src/include/utils/date.h
index eca2700ed17..5f235498363 100644
--- a/src/include/utils/date.h
+++ b/src/include/utils/date.h
@@ -7,7 +7,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/date.h,v 1.39 2008/01/01 19:45:59 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/date.h,v 1.40 2008/03/21 01:31:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,11 +29,7 @@ typedef float8 TimeADT;
typedef struct
{
-#ifdef HAVE_INT64_TIMESTAMP
- int64 time; /* all time units other than months and years */
-#else
- double time; /* all time units other than months and years */
-#endif
+ TimeADT time; /* all time units other than months and years */
int32 zone; /* numeric time zone, in seconds */
} TimeTzADT;
@@ -54,7 +50,8 @@ typedef struct
#define DateADTGetDatum(X) Int32GetDatum(X)
#define TimeADTGetDatum(X) Int64GetDatum(X)
#define TimeTzADTPGetDatum(X) PointerGetDatum(X)
-#else
+
+#else /* !HAVE_INT64_TIMESTAMP */
#define MAX_TIME_PRECISION 10
@@ -69,6 +66,7 @@ typedef struct
#define DateADTGetDatum(X) Int32GetDatum(X)
#define TimeADTGetDatum(X) Float8GetDatum(X)
#define TimeTzADTPGetDatum(X) PointerGetDatum(X)
+
#endif /* HAVE_INT64_TIMESTAMP */
#define PG_GETARG_DATEADT(n) DatumGetDateADT(PG_GETARG_DATUM(n))