PostgreSQL Source Code git master
|
Go to the source code of this file.
Data Structures | |
struct | Interval |
struct | pg_itm |
struct | pg_itm_in |
Macros | |
#define | MAX_TIMESTAMP_PRECISION 6 |
#define | MAX_INTERVAL_PRECISION 6 |
#define | TS_PREC_INV 1000000.0 |
#define | TSROUND(j) (rint(((double) (j)) * TS_PREC_INV) / TS_PREC_INV) |
#define | DAYS_PER_YEAR 365.25 /* assumes leap year every four years */ |
#define | MONTHS_PER_YEAR 12 |
#define | DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */ |
#define | DAYS_PER_WEEK 7 |
#define | HOURS_PER_DAY 24 /* assume no daylight savings time changes */ |
#define | SECS_PER_YEAR (36525 * 864) /* avoid floating-point computation */ |
#define | SECS_PER_DAY 86400 |
#define | SECS_PER_HOUR 3600 |
#define | SECS_PER_MINUTE 60 |
#define | MINS_PER_HOUR 60 |
#define | USECS_PER_DAY INT64CONST(86400000000) |
#define | USECS_PER_HOUR INT64CONST(3600000000) |
#define | USECS_PER_MINUTE INT64CONST(60000000) |
#define | USECS_PER_SEC INT64CONST(1000000) |
#define | MAX_TZDISP_HOUR 15 /* maximum allowed hour part */ |
#define | TZDISP_LIMIT ((MAX_TZDISP_HOUR + 1) * SECS_PER_HOUR) |
#define | TIMESTAMP_MINUS_INFINITY PG_INT64_MIN |
#define | TIMESTAMP_INFINITY PG_INT64_MAX |
#define | DT_NOBEGIN TIMESTAMP_MINUS_INFINITY |
#define | DT_NOEND TIMESTAMP_INFINITY |
#define | TIMESTAMP_NOBEGIN(j) do {(j) = DT_NOBEGIN;} while (0) |
#define | TIMESTAMP_IS_NOBEGIN(j) ((j) == DT_NOBEGIN) |
#define | TIMESTAMP_NOEND(j) do {(j) = DT_NOEND;} while (0) |
#define | TIMESTAMP_IS_NOEND(j) ((j) == DT_NOEND) |
#define | TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j)) |
#define | INTERVAL_NOBEGIN(i) |
#define | INTERVAL_IS_NOBEGIN(i) ((i)->month == PG_INT32_MIN && (i)->day == PG_INT32_MIN && (i)->time == PG_INT64_MIN) |
#define | INTERVAL_NOEND(i) |
#define | INTERVAL_IS_NOEND(i) ((i)->month == PG_INT32_MAX && (i)->day == PG_INT32_MAX && (i)->time == PG_INT64_MAX) |
#define | INTERVAL_NOT_FINITE(i) (INTERVAL_IS_NOBEGIN(i) || INTERVAL_IS_NOEND(i)) |
#define | JULIAN_MINYEAR (-4713) |
#define | JULIAN_MINMONTH (11) |
#define | JULIAN_MINDAY (24) |
#define | JULIAN_MAXYEAR (5874898) |
#define | JULIAN_MAXMONTH (6) |
#define | JULIAN_MAXDAY (3) |
#define | IS_VALID_JULIAN(y, m, d) |
#define | UNIX_EPOCH_JDATE 2440588 /* == date2j(1970, 1, 1) */ |
#define | POSTGRES_EPOCH_JDATE 2451545 /* == date2j(2000, 1, 1) */ |
#define | DATETIME_MIN_JULIAN (0) |
#define | DATE_END_JULIAN (2147483494) /* == date2j(JULIAN_MAXYEAR, 1, 1) */ |
#define | TIMESTAMP_END_JULIAN (109203528) /* == date2j(294277, 1, 1) */ |
#define | MIN_TIMESTAMP INT64CONST(-211813488000000000) |
#define | END_TIMESTAMP INT64CONST(9223371331200000000) |
#define | IS_VALID_DATE(d) |
#define | IS_VALID_TIMESTAMP(t) (MIN_TIMESTAMP <= (t) && (t) < END_TIMESTAMP) |
Typedefs | |
typedef int64 | Timestamp |
typedef int64 | TimestampTz |
typedef int64 | TimeOffset |
typedef int32 | fsec_t |
#define DATE_END_JULIAN (2147483494) /* == date2j(JULIAN_MAXYEAR, 1, 1) */ |
Definition at line 252 of file timestamp.h.
#define DATETIME_MIN_JULIAN (0) |
Definition at line 251 of file timestamp.h.
#define DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */ |
Definition at line 116 of file timestamp.h.
#define DAYS_PER_WEEK 7 |
Definition at line 117 of file timestamp.h.
#define DAYS_PER_YEAR 365.25 /* assumes leap year every four years */ |
Definition at line 107 of file timestamp.h.
#define DT_NOBEGIN TIMESTAMP_MINUS_INFINITY |
Definition at line 156 of file timestamp.h.
#define DT_NOEND TIMESTAMP_INFINITY |
Definition at line 157 of file timestamp.h.
#define END_TIMESTAMP INT64CONST(9223371331200000000) |
Definition at line 258 of file timestamp.h.
#define HOURS_PER_DAY 24 /* assume no daylight savings time changes */ |
Definition at line 118 of file timestamp.h.
#define INTERVAL_IS_NOBEGIN | ( | i | ) | ((i)->month == PG_INT32_MIN && (i)->day == PG_INT32_MIN && (i)->time == PG_INT64_MIN) |
Definition at line 182 of file timestamp.h.
#define INTERVAL_IS_NOEND | ( | i | ) | ((i)->month == PG_INT32_MAX && (i)->day == PG_INT32_MAX && (i)->time == PG_INT64_MAX) |
Definition at line 192 of file timestamp.h.
#define INTERVAL_NOBEGIN | ( | i | ) |
Definition at line 175 of file timestamp.h.
#define INTERVAL_NOEND | ( | i | ) |
Definition at line 185 of file timestamp.h.
#define INTERVAL_NOT_FINITE | ( | i | ) | (INTERVAL_IS_NOBEGIN(i) || INTERVAL_IS_NOEND(i)) |
Definition at line 195 of file timestamp.h.
#define IS_VALID_DATE | ( | d | ) |
Definition at line 262 of file timestamp.h.
#define IS_VALID_JULIAN | ( | y, | |
m, | |||
d | |||
) |
Definition at line 227 of file timestamp.h.
#define IS_VALID_TIMESTAMP | ( | t | ) | (MIN_TIMESTAMP <= (t) && (t) < END_TIMESTAMP) |
Definition at line 267 of file timestamp.h.
#define JULIAN_MAXDAY (3) |
Definition at line 225 of file timestamp.h.
#define JULIAN_MAXMONTH (6) |
Definition at line 224 of file timestamp.h.
#define JULIAN_MAXYEAR (5874898) |
Definition at line 223 of file timestamp.h.
#define JULIAN_MINDAY (24) |
Definition at line 222 of file timestamp.h.
#define JULIAN_MINMONTH (11) |
Definition at line 221 of file timestamp.h.
#define JULIAN_MINYEAR (-4713) |
Definition at line 220 of file timestamp.h.
#define MAX_INTERVAL_PRECISION 6 |
Definition at line 93 of file timestamp.h.
#define MAX_TIMESTAMP_PRECISION 6 |
Definition at line 92 of file timestamp.h.
#define MAX_TZDISP_HOUR 15 /* maximum allowed hour part */ |
Definition at line 143 of file timestamp.h.
#define MIN_TIMESTAMP INT64CONST(-211813488000000000) |
Definition at line 256 of file timestamp.h.
#define MINS_PER_HOUR 60 |
Definition at line 129 of file timestamp.h.
#define MONTHS_PER_YEAR 12 |
Definition at line 108 of file timestamp.h.
#define POSTGRES_EPOCH_JDATE 2451545 /* == date2j(2000, 1, 1) */ |
Definition at line 235 of file timestamp.h.
#define SECS_PER_DAY 86400 |
Definition at line 126 of file timestamp.h.
#define SECS_PER_HOUR 3600 |
Definition at line 127 of file timestamp.h.
#define SECS_PER_MINUTE 60 |
Definition at line 128 of file timestamp.h.
#define SECS_PER_YEAR (36525 * 864) /* avoid floating-point computation */ |
Definition at line 125 of file timestamp.h.
#define TIMESTAMP_END_JULIAN (109203528) /* == date2j(294277, 1, 1) */ |
Definition at line 253 of file timestamp.h.
#define TIMESTAMP_INFINITY PG_INT64_MAX |
Definition at line 151 of file timestamp.h.
#define TIMESTAMP_IS_NOBEGIN | ( | j | ) | ((j) == DT_NOBEGIN) |
Definition at line 162 of file timestamp.h.
Definition at line 167 of file timestamp.h.
#define TIMESTAMP_MINUS_INFINITY PG_INT64_MIN |
Definition at line 150 of file timestamp.h.
#define TIMESTAMP_NOBEGIN | ( | j | ) | do {(j) = DT_NOBEGIN;} while (0) |
Definition at line 159 of file timestamp.h.
Definition at line 164 of file timestamp.h.
#define TIMESTAMP_NOT_FINITE | ( | j | ) | (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j)) |
Definition at line 169 of file timestamp.h.
#define TS_PREC_INV 1000000.0 |
Definition at line 99 of file timestamp.h.
#define TSROUND | ( | j | ) | (rint(((double) (j)) * TS_PREC_INV) / TS_PREC_INV) |
Definition at line 100 of file timestamp.h.
#define TZDISP_LIMIT ((MAX_TZDISP_HOUR + 1) * SECS_PER_HOUR) |
Definition at line 144 of file timestamp.h.
#define UNIX_EPOCH_JDATE 2440588 /* == date2j(1970, 1, 1) */ |
Definition at line 234 of file timestamp.h.
#define USECS_PER_DAY INT64CONST(86400000000) |
Definition at line 131 of file timestamp.h.
#define USECS_PER_HOUR INT64CONST(3600000000) |
Definition at line 132 of file timestamp.h.
#define USECS_PER_MINUTE INT64CONST(60000000) |
Definition at line 133 of file timestamp.h.
#define USECS_PER_SEC INT64CONST(1000000) |
Definition at line 134 of file timestamp.h.
Definition at line 41 of file timestamp.h.
typedef int64 TimeOffset |
Definition at line 40 of file timestamp.h.
Definition at line 38 of file timestamp.h.
typedef int64 TimestampTz |
Definition at line 39 of file timestamp.h.