summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/datetime.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index df6cf5e4f30..34b88ad5c7a 100644
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/datetime.h,v 1.65 2007/02/19 17:41:39 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/datetime.h,v 1.66 2007/05/29 04:58:43 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -100,17 +100,19 @@
#define HOUR 10
#define MINUTE 11
#define SECOND 12
-#define DOY 13
-#define DOW 14
-#define UNITS 15
-#define ADBC 16
+#define MILLISECOND 13
+#define MICROSECOND 14
+#define DOY 15
+#define DOW 16
+#define UNITS 17
+#define ADBC 18
/* these are only for relative dates */
-#define AGO 17
-#define ABS_BEFORE 18
-#define ABS_AFTER 19
+#define AGO 19
+#define ABS_BEFORE 20
+#define ABS_AFTER 21
/* generic fields to help with parsing */
-#define ISODATE 20
-#define ISOTIME 21
+#define ISODATE 22
+#define ISOTIME 23
/* reserved for unrecognized string values */
#define UNKNOWN_FIELD 31
@@ -175,8 +177,10 @@
#define DTK_M(t) (0x01 << (t))
+/* Convenvience: a second, plus any fractional component */
+#define DTK_ALL_SECS_M (DTK_M(SECOND) | DTK_M(MILLISECOND) | DTK_M(MICROSECOND))
#define DTK_DATE_M (DTK_M(YEAR) | DTK_M(MONTH) | DTK_M(DAY))
-#define DTK_TIME_M (DTK_M(HOUR) | DTK_M(MINUTE) | DTK_M(SECOND))
+#define DTK_TIME_M (DTK_M(HOUR) | DTK_M(MINUTE) | DTK_ALL_SECS_M)
#define MAXDATELEN 63 /* maximum possible length of an input date
* string (not counting tr. null) */