|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Data Structures | |
| struct | TimeTzADT |
Macros | |
| #define | TIMETZ_TYPLEN 12 |
| #define | DATEVAL_NOBEGIN ((DateADT) PG_INT32_MIN) |
| #define | DATEVAL_NOEND ((DateADT) PG_INT32_MAX) |
| #define | DATE_NOBEGIN(j) ((j) = DATEVAL_NOBEGIN) |
| #define | DATE_IS_NOBEGIN(j) ((j) == DATEVAL_NOBEGIN) |
| #define | DATE_NOEND(j) ((j) = DATEVAL_NOEND) |
| #define | DATE_IS_NOEND(j) ((j) == DATEVAL_NOEND) |
| #define | DATE_NOT_FINITE(j) (DATE_IS_NOBEGIN(j) || DATE_IS_NOEND(j)) |
| #define | MAX_TIME_PRECISION 6 |
| #define | PG_GETARG_DATEADT(n) DatumGetDateADT(PG_GETARG_DATUM(n)) |
| #define | PG_GETARG_TIMEADT(n) DatumGetTimeADT(PG_GETARG_DATUM(n)) |
| #define | PG_GETARG_TIMETZADT_P(n) DatumGetTimeTzADTP(PG_GETARG_DATUM(n)) |
| #define | PG_RETURN_DATEADT(x) return DateADTGetDatum(x) |
| #define | PG_RETURN_TIMEADT(x) return TimeADTGetDatum(x) |
| #define | PG_RETURN_TIMETZADT_P(x) return TimeTzADTPGetDatum(x) |
Typedefs | |
| typedef int32 | DateADT |
| typedef int64 | TimeADT |
| #define DATE_NOT_FINITE | ( | j | ) | (DATE_IS_NOBEGIN(j) || DATE_IS_NOEND(j)) |
| #define DATEVAL_NOBEGIN ((DateADT) PG_INT32_MIN) |
| #define DATEVAL_NOEND ((DateADT) PG_INT32_MAX) |
| #define PG_GETARG_DATEADT | ( | n | ) | DatumGetDateADT(PG_GETARG_DATUM(n)) |
| #define PG_GETARG_TIMEADT | ( | n | ) | DatumGetTimeADT(PG_GETARG_DATUM(n)) |
| #define PG_GETARG_TIMETZADT_P | ( | n | ) | DatumGetTimeTzADTP(PG_GETARG_DATUM(n)) |
| #define PG_RETURN_TIMETZADT_P | ( | x | ) | return TimeTzADTPGetDatum(x) |
Definition at line 1733 of file date.c.
References fb(), INT64CONST, and MAX_TIME_PRECISION.
Referenced by executeDateTimeMethod(), GetSQLCurrentTime(), GetSQLLocalTime(), parse_datetime(), time_in(), time_recv(), time_scale(), timetz_in(), timetz_recv(), and timetz_scale().
Definition at line 65 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), MAX_TIME_PRECISION, and WARNING.
Referenced by anytime_typmodin(), executeDateTimeMethod(), and transformSQLValueFunction().
Definition at line 745 of file date.c.
References DATE_IS_NOBEGIN, DATE_IS_NOEND, fb(), and USECS_PER_DAY.
Referenced by convert_timevalue_to_scalar().
Definition at line 622 of file date.c.
References DATE_IS_NOBEGIN, DATE_IS_NOEND, ereturn, errcode(), errmsg, fb(), POSTGRES_EPOCH_JDATE, TIMESTAMP_END_JULIAN, TIMESTAMP_NOBEGIN, TIMESTAMP_NOEND, and USECS_PER_DAY.
Referenced by cvt_date_timestamp(), date2timestamp(), and date_cmp_timestamp_internal().
|
extern |
Definition at line 671 of file date.c.
References DATE_IS_NOBEGIN, DATE_IS_NOEND, DetermineTimeZoneOffset(), ereturn, errcode(), errmsg, fb(), IS_VALID_TIMESTAMP, j2date(), MIN_TIMESTAMP, POSTGRES_EPOCH_JDATE, session_timezone, TIMESTAMP_END_JULIAN, TIMESTAMP_NOBEGIN, TIMESTAMP_NOEND, tm, pg_tm::tm_hour, pg_tm::tm_mday, pg_tm::tm_min, pg_tm::tm_mon, pg_tm::tm_sec, pg_tm::tm_year, USECS_PER_DAY, and USECS_PER_SEC.
Referenced by cvt_date_timestamptz(), date2timestamptz(), and date_cmp_timestamptz_internal().
Definition at line 768 of file date.c.
References Assert, date2timestamp_safe(), ErrorSaveContext::error_occurred, fb(), timestamp_cmp_internal(), and TIMESTAMP_IS_NOEND.
Referenced by cmpDateToTimestamp(), date_cmp_timestamp(), date_eq_timestamp(), date_ge_timestamp(), date_gt_timestamp(), date_le_timestamp(), date_lt_timestamp(), date_ne_timestamp(), timestamp_cmp_date(), timestamp_eq_date(), timestamp_ge_date(), timestamp_gt_date(), timestamp_le_date(), timestamp_lt_date(), and timestamp_ne_date().
|
extern |
Definition at line 849 of file date.c.
References date2timestamptz_safe(), ErrorSaveContext::error_occurred, fb(), TIMESTAMP_IS_NOBEGIN, TIMESTAMP_IS_NOEND, and timestamptz_cmp_internal.
Referenced by cmpDateToTimestampTz(), date_cmp_timestamptz(), date_eq_timestamptz(), date_ge_timestamptz(), date_gt_timestamptz(), date_le_timestamptz(), date_lt_timestamptz(), date_ne_timestamptz(), timestamptz_cmp_date(), timestamptz_eq_date(), timestamptz_ge_date(), timestamptz_gt_date(), timestamptz_le_date(), timestamptz_lt_date(), and timestamptz_ne_date().
Definition at line 78 of file date.h.
References fb(), and Int32GetDatum().
Referenced by cvt_timestamp_date(), cvt_timestamptz_date(), date_decrement(), date_increment(), date_skipsupport(), daterange_canonical(), ExecEvalSQLValueFunction(), gbt_date_penalty(), gbt_date_ssup_cmp(), gbt_dateeq(), gbt_datege(), gbt_dategt(), gbt_datekey_cmp(), gbt_datele(), gbt_datelt(), gbt_num_fetch(), gdb_date_dist(), leftmostvalue_date(), and parse_datetime().
Definition at line 60 of file date.h.
References DatumGetInt32(), and fb().
Referenced by compareDatetime(), convert_timevalue_to_scalar(), cvt_date_timestamp(), cvt_date_timestamptz(), date_decrement(), date_increment(), daterange_canonical(), executeDateTimeMethod(), gbt_num_compress(), JsonEncodeDateTime(), and map_sql_value_to_xml_value().
Definition at line 66 of file date.h.
References DatumGetInt64(), and fb().
Referenced by convert_timevalue_to_scalar(), executeDateTimeMethod(), gbt_num_compress(), and JsonEncodeDateTime().
Definition at line 72 of file date.h.
References DatumGetPointer(), and fb().
Referenced by convert_timevalue_to_scalar(), executeDateTimeMethod(), gbt_timetz_compress(), and JsonEncodeDateTime().
Definition at line 295 of file date.c.
References DATE_IS_NOBEGIN, DATE_IS_NOEND, EARLY, elog, ERROR, fb(), LATE, and str.
Referenced by date_out(), and JsonEncodeDateTime().
Definition at line 1539 of file date.c.
References fb(), HOURS_PER_DAY, MINS_PER_HOUR, SECS_PER_MINUTE, USECS_PER_DAY, and USECS_PER_SEC.
Referenced by make_time(), and make_timestamp_internal().
Definition at line 310 of file date.c.
References date2j(), fb(), GetCurrentDateTime(), POSTGRES_EPOCH_JDATE, tm, pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.
Referenced by ExecEvalSQLValueFunction().
Definition at line 343 of file date.c.
References AdjustTimeForTypmod(), fb(), GetCurrentTimeUsec(), palloc_object, TimeTzADT::time, tm, and tm2timetz().
Referenced by ExecEvalSQLValueFunction().
Definition at line 363 of file date.c.
References AdjustTimeForTypmod(), fb(), GetCurrentTimeUsec(), tm, and tm2time().
Referenced by ExecEvalSQLValueFunction().
Definition at line 1576 of file date.c.
References tm, pg_tm::tm_hour, pg_tm::tm_min, pg_tm::tm_sec, USECS_PER_HOUR, USECS_PER_MINUTE, and USECS_PER_SEC.
Referenced by JsonEncodeDateTime(), time_out(), time_part_common(), and time_timetz().
Definition at line 1515 of file date.c.
References fb(), HOURS_PER_DAY, MINS_PER_HOUR, SECS_PER_MINUTE, USECS_PER_DAY, and USECS_PER_SEC.
Referenced by DecodeDateTime(), and DecodeTimeOnly().
Definition at line 84 of file date.h.
References fb(), and Int64GetDatum().
Referenced by ExecEvalSQLValueFunction(), executeDateTimeMethod(), gbt_num_fetch(), gbt_time_dist(), gbt_time_penalty(), gbt_timeeq(), gbt_timege(), gbt_timegt(), gbt_timekey_cmp(), gbt_timekey_ssup_cmp(), gbt_timele(), gbt_timelt(), leftmostvalue_time(), and parse_datetime().
Definition at line 1350 of file date.c.
References date2j(), DATE_NOBEGIN, DATE_NOEND, ereturn, errcode(), errmsg, fb(), POSTGRES_EPOCH_JDATE, timestamp2tm(), TIMESTAMP_IS_NOBEGIN, TIMESTAMP_IS_NOEND, tm, pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.
Referenced by cvt_timestamp_date(), and timestamp_date().
|
extern |
Definition at line 1424 of file date.c.
References date2j(), DATE_NOBEGIN, DATE_NOEND, ereturn, errcode(), errmsg, fb(), POSTGRES_EPOCH_JDATE, timestamp2tm(), TIMESTAMP_IS_NOBEGIN, TIMESTAMP_IS_NOEND, tm, pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.
Referenced by cvt_timestamptz_date(), and timestamptz_date().
Definition at line 2491 of file date.c.
References fb(), TimeTzADT::time, tm, pg_tm::tm_hour, pg_tm::tm_min, pg_tm::tm_sec, USECS_PER_HOUR, USECS_PER_MINUTE, USECS_PER_SEC, and TimeTzADT::zone.
Referenced by JsonEncodeDateTime(), timetz_out(), and timetz_part_common().
Definition at line 90 of file date.h.
References fb(), and PointerGetDatum().
Referenced by ExecEvalSQLValueFunction(), executeDateTimeMethod(), leftmostvalue_timetz(), and parse_datetime().
Definition at line 1504 of file date.c.
References MINS_PER_HOUR, SECS_PER_MINUTE, tm, pg_tm::tm_hour, pg_tm::tm_min, pg_tm::tm_sec, and USECS_PER_SEC.
Referenced by GetSQLLocalTime(), parse_datetime(), and time_in().
Definition at line 2351 of file date.c.
References MINS_PER_HOUR, SECS_PER_MINUTE, TimeTzADT::time, tm, pg_tm::tm_hour, pg_tm::tm_min, pg_tm::tm_sec, USECS_PER_SEC, and TimeTzADT::zone.
Referenced by GetSQLCurrentTime(), parse_datetime(), timestamptz_timetz(), and timetz_in().