aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/pgtypeslib/dt.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/pgtypeslib/dt.h b/src/interfaces/ecpg/pgtypeslib/dt.h
index ce40bf9a759..5f686202337 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt.h
+++ b/src/interfaces/ecpg/pgtypeslib/dt.h
@@ -247,14 +247,23 @@ extern int day_tab[2][13];
|| (((y) == UTIME_MAXYEAR) && (((m) < UTIME_MAXMONTH) \
|| (((m) == UTIME_MAXMONTH) && ((d) <= UTIME_MAXDAY))))))
+#ifdef HAVE_INT64_TIMESTAMP
+
+#define DT_NOBEGIN (-INT64CONST(0x7fffffffffffffff) - 1)
+#define DT_NOEND (INT64CONST(0x7fffffffffffffff))
+
+#else
+
#ifdef HUGE_VAL
-#define DT_NOBEGIN (-HUGE_VAL)
-#define DT_NOEND (HUGE_VAL)
+#define DT_NOBEGIN (-HUGE_VAL)
+#define DT_NOEND (HUGE_VAL)
#else
-#define DT_NOBEGIN (-DBL_MAX)
-#define DT_NOEND (DBL_MAX)
+#define DT_NOBEGIN (-DBL_MAX)
+#define DT_NOEND (DBL_MAX)
#endif
+#endif /* HAVE_INT64_TIMESTAMP */
+
#define TIMESTAMP_NOBEGIN(j) do {j = DT_NOBEGIN;} while (0)
#define TIMESTAMP_NOEND(j) do {j = DT_NOEND;} while (0)
#define TIMESTAMP_IS_NOBEGIN(j) ((j) == DT_NOBEGIN)