diff options
author | Thomas G. Lockhart <lockhart@fourpalms.org> | 2001-09-28 08:09:14 +0000 |
---|---|---|
committer | Thomas G. Lockhart <lockhart@fourpalms.org> | 2001-09-28 08:09:14 +0000 |
commit | 6f58115dddfa8ca63004c4784f57ef660422861d (patch) | |
tree | 71816e03286e53113ec4b6de337f0b345028a314 /src/include/utils/datetime.h | |
parent | 1f075a32ee28004251f508f50a4325944801da10 (diff) | |
download | postgresql-6f58115dddfa8ca63004c4784f57ef660422861d.tar.gz postgresql-6f58115dddfa8ca63004c4784f57ef660422861d.zip |
Measure the current transaction time to milliseconds.
Define a new function, GetCurrentTransactionStartTimeUsec() to get the time
to this precision.
Allow now() and timestamp 'now' to use this higher precision result so
we now have fractional seconds in this "constant".
Add timestamp without time zone type.
Move previous timestamp type to timestamp with time zone.
Accept another ISO variant for date/time values: yyyy-mm-ddThh:mm:ss
(note the "T" separating the day from hours information).
Remove 'current' from date/time types; convert to 'now' in input.
Separate time and timetz regression tests.
Separate timestamp and timestamptz regression test.
Diffstat (limited to 'src/include/utils/datetime.h')
-rw-r--r-- | src/include/utils/datetime.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index d299c042eb1..f2102a21e55 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: datetime.h,v 1.21 2001/08/27 20:02:10 tgl Exp $ + * $Id: datetime.h,v 1.22 2001/09/28 08:09:14 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -86,7 +86,7 @@ #define MONTH 1 #define YEAR 2 #define DAY 3 -#define TIMES 4 /* not used - thomas 1997-07-14 */ +#define JULIAN 4 #define TZ 5 #define DTZ 6 #define DTZMOD 7 @@ -103,6 +103,8 @@ #define AGO 17 #define ABS_BEFORE 18 #define ABS_AFTER 19 +/* reserved for unrecognized string values */ +#define UNKNOWN_FIELD 31 /* * Token field definitions for time parsing and decoding. @@ -149,12 +151,17 @@ #define DTK_MILLENNIUM 28 #define DTK_MILLISEC 29 #define DTK_MICROSEC 30 +#define DTK_JULIAN 31 #define DTK_DOW 32 #define DTK_DOY 33 #define DTK_TZ_HOUR 34 #define DTK_TZ_MINUTE 35 +#define DTK_ISO_DATE 36 +#define DTK_ISO_TIME 37 + + /* * Bit mask definitions for time parsing. */ @@ -238,6 +245,7 @@ extern int day_tab[2][13]; extern void GetCurrentTime(struct tm * tm); +extern void GetCurrentTimeUsec(struct tm * tm, double *fsec); extern void j2date(int jd, int *year, int *month, int *day); extern int date2j(int year, int month, int day); |