|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <ctype.h>#include <limits.h>#include <float.h>#include <math.h>#include <time.h>#include "access/xact.h"#include "catalog/pg_type.h"#include "common/hashfn.h"#include "common/int.h"#include "libpq/pqformat.h"#include "miscadmin.h"#include "nodes/miscnodes.h"#include "nodes/supportnodes.h"#include "parser/scansup.h"#include "utils/array.h"#include "utils/builtins.h"#include "utils/date.h"#include "utils/datetime.h"#include "utils/numeric.h"#include "utils/skipsupport.h"#include "utils/sortsupport.h"
Go to the source code of this file.
Macros | |
| #define | TIMEADT_GT(t1, t2) (DatumGetTimeADT(t1) > DatumGetTimeADT(t2)) |
| #define | TIMEADT_LT(t1, t2) (DatumGetTimeADT(t1) < DatumGetTimeADT(t2)) |
| #define | TIMETZ_GT(t1, t2) DatumGetBool(DirectFunctionCall2(timetz_gt,t1,t2)) |
| #define | TIMETZ_LT(t1, t2) DatumGetBool(DirectFunctionCall2(timetz_lt,t1,t2)) |
| #define TIMEADT_GT | ( | t1, | |
| t2 | |||
| ) | (DatumGetTimeADT(t1) > DatumGetTimeADT(t2)) |
| #define TIMEADT_LT | ( | t1, | |
| t2 | |||
| ) | (DatumGetTimeADT(t1) < DatumGetTimeADT(t2)) |
| #define TIMETZ_GT | ( | t1, | |
| t2 | |||
| ) | DatumGetBool(DirectFunctionCall2(timetz_gt,t1,t2)) |
| #define TIMETZ_LT | ( | t1, | |
| t2 | |||
| ) | DatumGetBool(DirectFunctionCall2(timetz_lt,t1,t2)) |
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 44 of file date.c.
References anytime_typmod_check(), ArrayGetIntegerTypmods(), ereport, errcode(), errmsg, ERROR, and fb().
Referenced by timetypmodin(), and timetztypmodin().
Definition at line 87 of file date.c.
References fb(), psprintf(), and pstrdup().
Referenced by timetypmodout(), and timetztypmodout().
|
static |
Definition at line 655 of file date.c.
References date2timestamp_safe(), and fb().
Referenced by date_mi_interval(), date_pl_interval(), date_timestamp(), datetime_timestamp(), and in_range_date_interval().
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().
|
static |
Definition at line 729 of file date.c.
References date2timestamptz_safe(), and fb().
Referenced by date_timestamptz().
| TimestampTz date2timestamptz_safe | ( | DateADT | dateVal, |
| Node * | escontext | ||
| ) |
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().
| Datum date_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 438 of file date.c.
References fb(), PG_GETARG_DATEADT, and PG_RETURN_INT32.
Referenced by compareDatetime(), gbt_date_ssup_cmp(), and gbt_datekey_cmp().
| Datum date_cmp_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 840 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_INT32.
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().
| Datum date_cmp_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 928 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_INT32.
| int32 date_cmp_timestamptz_internal | ( | DateADT | dateVal, |
| TimestampTz | dt2 | ||
| ) |
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 460 of file date.c.
References DateADTGetDatum(), DATEVAL_NOBEGIN, DatumGetDateADT(), and fb().
Referenced by date_skipsupport().
| Datum date_eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 384 of file date.c.
References fb(), PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Referenced by gbt_dateeq().
| Datum date_eq_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 786 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum date_eq_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 874 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum date_finite | ( | PG_FUNCTION_ARGS | ) |
Definition at line 517 of file date.c.
References DATE_NOT_FINITE, PG_GETARG_DATEADT, and PG_RETURN_BOOL.
| Datum date_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 429 of file date.c.
References fb(), PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Referenced by gbt_datege().
| Datum date_ge_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 831 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum date_ge_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 919 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum date_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 420 of file date.c.
References fb(), PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Referenced by gbt_dategt().
| Datum date_gt_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 813 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum date_gt_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 901 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum date_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 107 of file date.c.
References date2j(), DATE_NOBEGIN, DATE_NOEND, DateTimeParseError(), DecodeDateTime(), DTERR_BAD_FORMAT, DTK_DATE, DTK_EARLY, DTK_EPOCH, DTK_LATE, ereturn, errcode(), errmsg, fb(), GetEpochTime(), IS_VALID_DATE, IS_VALID_JULIAN, MAXDATEFIELDS, MAXDATELEN, ParseDateTime(), PG_GETARG_CSTRING, PG_RETURN_DATEADT, PG_RETURN_NULL, POSTGRES_EPOCH_JDATE, str, tm, pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.
Definition at line 476 of file date.c.
References DateADTGetDatum(), DATEVAL_NOEND, DatumGetDateADT(), and fb().
Referenced by date_skipsupport().
| Datum date_larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 525 of file date.c.
References fb(), PG_GETARG_DATEADT, and PG_RETURN_DATEADT.
| Datum date_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 411 of file date.c.
References fb(), PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Referenced by gbt_datele().
| Datum date_le_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 822 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum date_le_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 910 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum date_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 402 of file date.c.
References fb(), PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Referenced by gbt_datelt().
| Datum date_lt_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 804 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum date_lt_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 892 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum date_mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 545 of file date.c.
References DATE_NOT_FINITE, ereport, errcode(), errmsg, ERROR, fb(), PG_GETARG_DATEADT, and PG_RETURN_INT32.
Referenced by date_dist(), gbt_date_penalty(), and gdb_date_dist().
| Datum date_mi_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1296 of file date.c.
References date2timestamp(), DirectFunctionCall2, fb(), PG_GETARG_DATEADT, PG_GETARG_INTERVAL_P, PointerGetDatum(), timestamp_mi_interval(), and TimestampGetDatum().
| Datum date_mii | ( | PG_FUNCTION_ARGS | ) |
Definition at line 586 of file date.c.
References DATE_NOT_FINITE, days, ereport, errcode(), errmsg, ERROR, fb(), IS_VALID_DATE, PG_GETARG_DATEADT, PG_GETARG_INT32, and PG_RETURN_DATEADT.
| Datum date_ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 393 of file date.c.
References fb(), PG_GETARG_DATEADT, and PG_RETURN_BOOL.
| Datum date_ne_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 795 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum date_ne_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 883 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum date_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 178 of file date.c.
References buf, DATE_NOT_FINITE, DateStyle, EncodeDateOnly(), EncodeSpecialDate(), fb(), j2date(), MAXDATELEN, PG_GETARG_DATEADT, PG_RETURN_CSTRING, POSTGRES_EPOCH_JDATE, pstrdup(), tm, pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.
Referenced by ExecGetJsonValueItemString().
| Datum date_pl_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1276 of file date.c.
References date2timestamp(), DirectFunctionCall2, fb(), PG_GETARG_DATEADT, PG_GETARG_INTERVAL_P, PointerGetDatum(), timestamp_pl_interval(), and TimestampGetDatum().
| Datum date_pli | ( | PG_FUNCTION_ARGS | ) |
Definition at line 562 of file date.c.
References DATE_NOT_FINITE, days, ereport, errcode(), errmsg, ERROR, fb(), IS_VALID_DATE, PG_GETARG_DATEADT, PG_GETARG_INT32, and PG_RETURN_DATEADT.
| Datum date_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 203 of file date.c.
References buf, DATE_NOT_FINITE, ereport, errcode(), errmsg, ERROR, fb(), IS_VALID_DATE, PG_GETARG_POINTER, PG_RETURN_DATEADT, and pq_getmsgint().
| Datum date_send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 225 of file date.c.
References buf, PG_GETARG_DATEADT, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), and pq_sendint32().
| Datum date_skipsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 492 of file date.c.
References date_decrement(), date_increment(), DateADTGetDatum(), DATEVAL_NOBEGIN, DATEVAL_NOEND, SkipSupportData::decrement, SkipSupportData::high_elem, SkipSupportData::increment, SkipSupportData::low_elem, PG_GETARG_POINTER, and PG_RETURN_VOID.
| Datum date_smaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 534 of file date.c.
References fb(), PG_GETARG_DATEADT, and PG_RETURN_DATEADT.
| Datum date_sortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 451 of file date.c.
References SortSupportData::comparator, PG_GETARG_POINTER, PG_RETURN_VOID, and ssup_datum_int32_cmp().
| Datum date_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1313 of file date.c.
References date2timestamp(), fb(), PG_GETARG_DATEADT, and PG_RETURN_TIMESTAMP.
Referenced by executeDateTimeMethod().
| Datum date_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1386 of file date.c.
References date2timestamptz(), fb(), PG_GETARG_DATEADT, and PG_RETURN_TIMESTAMP.
Referenced by executeDateTimeMethod().
| Datum datetime_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2054 of file date.c.
References date2timestamp(), ereport, errcode(), errmsg, ERROR, fb(), IS_VALID_TIMESTAMP, PG_GETARG_DATEADT, PG_GETARG_TIMEADT, PG_RETURN_TIMESTAMP, and TIMESTAMP_NOT_FINITE.
| Datum datetimetz_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2974 of file date.c.
References DATE_IS_NOBEGIN, DATE_IS_NOEND, ereport, errcode(), errmsg, ERROR, fb(), IS_VALID_TIMESTAMP, PG_GETARG_DATEADT, PG_GETARG_TIMETZADT_P, PG_RETURN_TIMESTAMP, POSTGRES_EPOCH_JDATE, TimeTzADT::time, TIMESTAMP_END_JULIAN, TIMESTAMP_NOBEGIN, TIMESTAMP_NOEND, USECS_PER_DAY, USECS_PER_SEC, and TimeTzADT::zone.
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().
| Datum extract_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1096 of file date.c.
References CStringGetDatum(), date2isoweek(), date2isoyear(), date2j(), DATE_IS_NOBEGIN, DATE_NOT_FINITE, DatumGetNumeric(), DecodeSpecial(), DecodeUnits(), DirectFunctionCall3, downcase_truncate_identifier(), DTK_CENTURY, DTK_DAY, DTK_DECADE, DTK_DOW, DTK_DOY, DTK_EPOCH, DTK_ISODOW, DTK_ISOYEAR, DTK_JULIAN, DTK_MILLENNIUM, DTK_MONTH, DTK_QUARTER, DTK_WEEK, DTK_YEAR, ereport, errcode(), errmsg, ERROR, fb(), format_type_be(), Int32GetDatum(), int64_to_numeric(), InvalidOid, j2date(), j2day(), numeric_in(), ObjectIdGetDatum(), PG_GETARG_DATEADT, PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_NUMERIC, POSTGRES_EPOCH_JDATE, RESERV, SECS_PER_DAY, type, UNITS, UNIX_EPOCH_JDATE, UNKNOWN_FIELD, val, VARDATA_ANY(), and VARSIZE_ANY_EXHDR().
| Datum extract_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2337 of file date.c.
References time_part_common().
| Datum extract_timetz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3138 of file date.c.
References timetz_part_common().
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().
| Datum hashdate | ( | PG_FUNCTION_ARGS | ) |
| Datum hashdateextended | ( | PG_FUNCTION_ARGS | ) |
Definition at line 511 of file date.c.
References hash_uint32_extended(), PG_GETARG_DATEADT, and PG_GETARG_INT64.
| Datum in_range_date_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1069 of file date.c.
References BoolGetDatum(), date2timestamp(), DirectFunctionCall5, fb(), in_range_timestamp_interval(), IntervalPGetDatum(), PG_GETARG_BOOL, PG_GETARG_DATEADT, PG_GETARG_INTERVAL_P, TimestampGetDatum(), and val.
| Datum in_range_time_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2186 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), pg_add_s64_overflow(), PG_GETARG_BOOL, PG_GETARG_INTERVAL_P, PG_GETARG_TIMEADT, PG_RETURN_BOOL, Interval::time, and val.
| Datum in_range_timetz_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2738 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), pg_add_s64_overflow(), PG_GETARG_BOOL, PG_GETARG_INTERVAL_P, PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, Interval::time, TimeTzADT::time, timetz_cmp_internal(), val, and TimeTzADT::zone.
| Datum interval_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2100 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), INTERVAL_NOT_FINITE, PG_GETARG_INTERVAL_P, PG_RETURN_TIMEADT, and USECS_PER_DAY.
| Datum make_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 239 of file date.c.
References date2j(), DTK_DATE_M, ereport, errcode(), errmsg, ERROR, fb(), IS_VALID_DATE, IS_VALID_JULIAN, PG_GETARG_INT32, pg_neg_s32_overflow(), PG_RETURN_DATEADT, POSTGRES_EPOCH_JDATE, tm, pg_tm::tm_mday, pg_tm::tm_mon, pg_tm::tm_year, and ValidateDate().
| Datum make_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1665 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), float_time_overflows(), MINS_PER_HOUR, PG_GETARG_FLOAT8, PG_GETARG_INT32, PG_RETURN_TIMEADT, SECS_PER_MINUTE, pg_tm::tm_hour, pg_tm::tm_min, and USECS_PER_SEC.
| Datum overlaps_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1871 of file date.c.
References fb(), PG_ARGISNULL, PG_GETARG_DATUM, PG_RETURN_BOOL, PG_RETURN_NULL, TIMEADT_GT, and TIMEADT_LT.
| Datum overlaps_timetz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2783 of file date.c.
References fb(), PG_ARGISNULL, PG_GETARG_DATUM, PG_RETURN_BOOL, PG_RETURN_NULL, TIMETZ_GT, and TIMETZ_LT.
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().
| Datum time_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1822 of file date.c.
References fb(), PG_GETARG_TIMEADT, and PG_RETURN_INT32.
Referenced by compareDatetime(), gbt_timekey_cmp(), and gbt_timekey_ssup_cmp().
| Datum time_eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1768 of file date.c.
References fb(), PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
Referenced by gbt_timeeq().
| Datum time_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1813 of file date.c.
References fb(), PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
Referenced by gbt_timege().
| Datum time_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1804 of file date.c.
References fb(), PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
Referenced by gbt_timegt().
| Datum time_hash | ( | PG_FUNCTION_ARGS | ) |
| Datum time_hash_extended | ( | PG_FUNCTION_ARGS | ) |
| Datum time_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1462 of file date.c.
References AdjustTimeForTypmod(), DateTimeParseError(), DecodeTimeOnly(), fb(), MAXDATEFIELDS, MAXDATELEN, ParseDateTime(), PG_GETARG_CSTRING, PG_GETARG_INT32, PG_GETARG_OID, PG_RETURN_NULL, PG_RETURN_TIMEADT, str, tm, and tm2time().
| Datum time_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2077 of file date.c.
References Interval::day, Interval::month, palloc_object, PG_GETARG_TIMEADT, PG_RETURN_INTERVAL_P, and Interval::time.
| Datum time_larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1847 of file date.c.
References fb(), PG_GETARG_TIMEADT, and PG_RETURN_TIMEADT.
| Datum time_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1795 of file date.c.
References fb(), PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
Referenced by gbt_timele().
| Datum time_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1786 of file date.c.
References fb(), PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
Referenced by gbt_timelt().
| Datum time_mi_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2163 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), INT64CONST, INTERVAL_NOT_FINITE, PG_GETARG_INTERVAL_P, PG_GETARG_TIMEADT, PG_RETURN_TIMEADT, and USECS_PER_DAY.
| Datum time_mi_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2121 of file date.c.
References Interval::day, fb(), Interval::month, palloc_object, PG_GETARG_TIMEADT, PG_RETURN_INTERVAL_P, and Interval::time.
Referenced by gbt_time_dist(), gbt_time_penalty(), and time_dist().
| Datum time_ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1777 of file date.c.
References fb(), PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
| Datum time_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1589 of file date.c.
References buf, DateStyle, EncodeTimeOnly(), fb(), MAXDATELEN, PG_GETARG_TIMEADT, PG_RETURN_CSTRING, pstrdup(), time2tm(), and tm.
Referenced by ExecGetJsonValueItemString().
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().
| Datum time_part | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2331 of file date.c.
References time_part_common().
|
static |
Definition at line 2228 of file date.c.
References DecodeSpecial(), DecodeUnits(), downcase_truncate_identifier(), DTK_CENTURY, DTK_DAY, DTK_DECADE, DTK_EPOCH, DTK_HOUR, DTK_ISOYEAR, DTK_MICROSEC, DTK_MILLENNIUM, DTK_MILLISEC, DTK_MINUTE, DTK_MONTH, DTK_QUARTER, DTK_SECOND, DTK_TZ, DTK_TZ_HOUR, DTK_TZ_MINUTE, DTK_YEAR, ereport, errcode(), errmsg, ERROR, fb(), format_type_be(), int64_div_fast_to_numeric(), int64_to_numeric(), INT64CONST, PG_GETARG_TEXT_PP, PG_GETARG_TIMEADT, PG_RETURN_FLOAT8, PG_RETURN_NUMERIC, RESERV, time2tm(), tm, pg_tm::tm_hour, pg_tm::tm_min, pg_tm::tm_sec, type, UNITS, UNKNOWN_FIELD, val, VARDATA_ANY(), and VARSIZE_ANY_EXHDR().
Referenced by extract_time(), and time_part().
| Datum time_pl_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2140 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), INT64CONST, INTERVAL_NOT_FINITE, PG_GETARG_INTERVAL_P, PG_GETARG_TIMEADT, PG_RETURN_TIMEADT, and USECS_PER_DAY.
| Datum time_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1609 of file date.c.
References AdjustTimeForTypmod(), buf, ereport, errcode(), errmsg, ERROR, fb(), INT64CONST, PG_GETARG_INT32, PG_GETARG_OID, PG_GETARG_POINTER, PG_RETURN_TIMEADT, pq_getmsgint64(), and USECS_PER_DAY.
| Datum time_scale | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1713 of file date.c.
References AdjustTimeForTypmod(), PG_GETARG_INT32, PG_GETARG_TIMEADT, and PG_RETURN_TIMEADT.
| Datum time_send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1635 of file date.c.
References buf, PG_GETARG_TIMEADT, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), and pq_sendint64().
| Datum time_smaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1856 of file date.c.
References fb(), PG_GETARG_TIMEADT, and PG_RETURN_TIMEADT.
| Datum time_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1693 of file date.c.
References fb(), IsA, MAX_TIME_PRECISION, PG_GETARG_POINTER, PG_RETURN_POINTER, and TemporalSimplify().
| Datum time_timetz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2916 of file date.c.
References DetermineTimeZoneOffset(), fb(), GetCurrentDateTime(), palloc_object, PG_GETARG_TIMEADT, PG_RETURN_TIMETZADT_P, session_timezone, TimeTzADT::time, time2tm(), tm, and TimeTzADT::zone.
Referenced by castTimeToTimeTz(), and executeDateTimeMethod().
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().
| Datum timestamp_cmp_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 991 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_INT32.
| Datum timestamp_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1327 of file date.c.
References fb(), PG_GETARG_TIMESTAMP, PG_RETURN_DATEADT, and timestamp2date_safe().
Referenced by executeDateTimeMethod().
| Datum timestamp_eq_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 937 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum timestamp_ge_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 982 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum timestamp_gt_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 964 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum timestamp_le_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 973 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum timestamp_lt_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 955 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum timestamp_ne_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 946 of file date.c.
References date_cmp_timestamp_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
| Datum timestamp_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1993 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), MINS_PER_HOUR, PG_GETARG_TIMESTAMP, PG_RETURN_NULL, PG_RETURN_TIMEADT, SECS_PER_MINUTE, timestamp2tm(), TIMESTAMP_NOT_FINITE, tm, pg_tm::tm_hour, pg_tm::tm_min, pg_tm::tm_sec, and USECS_PER_SEC.
Referenced by executeDateTimeMethod().
| DateADT timestamptz2date_safe | ( | TimestampTz | timestamp, |
| Node * | escontext | ||
| ) |
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().
| Datum timestamptz_cmp_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1054 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_INT32.
| Datum timestamptz_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1401 of file date.c.
References fb(), PG_GETARG_TIMESTAMP, PG_RETURN_DATEADT, and timestamptz2date_safe().
Referenced by executeDateTimeMethod().
| Datum timestamptz_eq_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1000 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum timestamptz_ge_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1045 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum timestamptz_gt_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1027 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum timestamptz_le_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1036 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum timestamptz_lt_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1018 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum timestamptz_ne_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1009 of file date.c.
References date_cmp_timestamptz_internal(), fb(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
| Datum timestamptz_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2023 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), MINS_PER_HOUR, PG_GETARG_TIMESTAMP, PG_RETURN_NULL, PG_RETURN_TIMEADT, SECS_PER_MINUTE, timestamp2tm(), TIMESTAMP_NOT_FINITE, tm, pg_tm::tm_hour, pg_tm::tm_min, pg_tm::tm_sec, and USECS_PER_SEC.
Referenced by executeDateTimeMethod().
| Datum timestamptz_timetz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2942 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), palloc_object, PG_GETARG_TIMESTAMP, PG_RETURN_NULL, PG_RETURN_TIMETZADT_P, timestamp2tm(), TIMESTAMP_NOT_FINITE, tm, and tm2timetz().
Referenced by executeDateTimeMethod().
| Datum timetypmodin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1646 of file date.c.
References anytime_typmodin(), fb(), PG_GETARG_ARRAYTYPE_P, and PG_RETURN_INT32.
| Datum timetypmodout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1654 of file date.c.
References anytime_typmodout(), PG_GETARG_INT32, and PG_RETURN_CSTRING.
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().
| Datum timetz_at_local | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3253 of file date.c.
References cstring_to_text(), DirectFunctionCall2, pg_get_timezone_name(), PG_GETARG_DATUM, PointerGetDatum(), session_timezone, and timetz_zone().
| Datum timetz_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2612 of file date.c.
References fb(), PG_GETARG_TIMETZADT_P, PG_RETURN_INT32, and timetz_cmp_internal().
Referenced by compareDatetime().
Definition at line 2531 of file date.c.
References fb(), and USECS_PER_SEC.
Referenced by in_range_timetz_interval(), timetz_cmp(), timetz_eq(), timetz_ge(), timetz_gt(), timetz_larger(), timetz_le(), timetz_lt(), timetz_ne(), and timetz_smaller().
| Datum timetz_eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2558 of file date.c.
References fb(), PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
| Datum timetz_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2603 of file date.c.
References fb(), PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
| Datum timetz_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2594 of file date.c.
References fb(), PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
| Datum timetz_hash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2621 of file date.c.
References DatumGetUInt32(), DirectFunctionCall1, fb(), hash_uint32(), hashint8(), Int64GetDatumFast, PG_GETARG_TIMETZADT_P, and PG_RETURN_UINT32.
| Datum timetz_hash_extended | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2637 of file date.c.
References DatumGetInt64(), DatumGetUInt64(), DirectFunctionCall2, fb(), hash_uint32_extended(), hashint8extended(), Int64GetDatumFast, PG_GETARG_DATUM, PG_GETARG_TIMETZADT_P, and PG_RETURN_UINT64.
| Datum timetz_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2361 of file date.c.
References AdjustTimeForTypmod(), DateTimeParseError(), DecodeTimeOnly(), fb(), MAXDATEFIELDS, MAXDATELEN, palloc_object, ParseDateTime(), PG_GETARG_CSTRING, PG_GETARG_INT32, PG_GETARG_OID, PG_RETURN_NULL, PG_RETURN_TIMETZADT_P, str, TimeTzADT::time, tm, and tm2timetz().
| Datum timetz_izone | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3210 of file date.c.
References DatumGetCString(), DirectFunctionCall1, ereport, errcode(), errmsg, ERROR, fb(), INT64CONST, INTERVAL_NOT_FINITE, interval_out(), palloc_object, PG_GETARG_INTERVAL_P, PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, PointerGetDatum(), TimeTzADT::time, USECS_PER_DAY, USECS_PER_SEC, and TimeTzADT::zone.
| Datum timetz_larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2653 of file date.c.
References fb(), PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, and timetz_cmp_internal().
| Datum timetz_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2585 of file date.c.
References fb(), PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
| Datum timetz_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2576 of file date.c.
References fb(), PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
| Datum timetz_mi_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2711 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), INT64CONST, INTERVAL_NOT_FINITE, palloc_object, PG_GETARG_INTERVAL_P, PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, TimeTzADT::time, USECS_PER_DAY, and TimeTzADT::zone.
| Datum timetz_ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2567 of file date.c.
References fb(), PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
| Datum timetz_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2402 of file date.c.
References buf, DateStyle, EncodeTimeOnly(), fb(), MAXDATELEN, PG_GETARG_TIMETZADT_P, PG_RETURN_CSTRING, pstrdup(), timetz2tm(), and tm.
Referenced by ExecGetJsonValueItemString().
| Datum timetz_part | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3132 of file date.c.
References timetz_part_common().
|
static |
Definition at line 3015 of file date.c.
References DecodeSpecial(), DecodeUnits(), downcase_truncate_identifier(), DTK_CENTURY, DTK_DAY, DTK_DECADE, DTK_EPOCH, DTK_HOUR, DTK_MICROSEC, DTK_MILLENNIUM, DTK_MILLISEC, DTK_MINUTE, DTK_MONTH, DTK_QUARTER, DTK_SECOND, DTK_TZ, DTK_TZ_HOUR, DTK_TZ_MINUTE, DTK_YEAR, ereport, errcode(), errmsg, ERROR, fb(), format_type_be(), int64_div_fast_to_numeric(), int64_to_numeric(), INT64CONST, MINS_PER_HOUR, PG_GETARG_TEXT_PP, PG_GETARG_TIMETZADT_P, PG_RETURN_FLOAT8, PG_RETURN_NUMERIC, RESERV, SECS_PER_HOUR, SECS_PER_MINUTE, TimeTzADT::time, timetz2tm(), tm, pg_tm::tm_hour, pg_tm::tm_min, pg_tm::tm_sec, type, UNITS, UNKNOWN_FIELD, val, VARDATA_ANY(), VARSIZE_ANY_EXHDR(), and TimeTzADT::zone.
Referenced by extract_timetz(), and timetz_part().
| Datum timetz_pl_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2684 of file date.c.
References ereport, errcode(), errmsg, ERROR, fb(), INT64CONST, INTERVAL_NOT_FINITE, palloc_object, PG_GETARG_INTERVAL_P, PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, TimeTzADT::time, USECS_PER_DAY, and TimeTzADT::zone.
| Datum timetz_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2423 of file date.c.
References AdjustTimeForTypmod(), buf, ereport, errcode(), errmsg, ERROR, fb(), INT64CONST, palloc_object, PG_GETARG_INT32, PG_GETARG_OID, PG_GETARG_POINTER, PG_RETURN_TIMETZADT_P, pq_getmsgint(), pq_getmsgint64(), TimeTzADT::time, TZDISP_LIMIT, USECS_PER_DAY, and TimeTzADT::zone.
| Datum timetz_scale | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2513 of file date.c.
References AdjustTimeForTypmod(), palloc_object, PG_GETARG_INT32, PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, TimeTzADT::time, and TimeTzADT::zone.
| Datum timetz_send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2459 of file date.c.
References buf, PG_GETARG_TIMETZADT_P, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), pq_sendint32(), pq_sendint64(), TimeTzADT::time, and TimeTzADT::zone.
| Datum timetz_smaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2667 of file date.c.
References fb(), PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, and timetz_cmp_internal().
| Datum timetz_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2903 of file date.c.
References fb(), PG_GETARG_TIMETZADT_P, and PG_RETURN_TIMEADT.
Referenced by executeDateTimeMethod().
| Datum timetz_zone | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3148 of file date.c.
References DecodeTimezoneName(), DetermineTimeZoneAbbrevOffsetTS(), ereport, errcode(), errmsg, ERROR, fb(), GetCurrentTransactionStartTimestamp(), INT64CONST, now(), palloc_object, PG_GETARG_TEXT_PP, PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, text_to_cstring_buffer(), TimeTzADT::time, timestamp2tm(), tm, type, TZ_STRLEN_MAX, TZNAME_DYNTZ, TZNAME_FIXED_OFFSET, USECS_PER_DAY, USECS_PER_SEC, val, and TimeTzADT::zone.
Referenced by timetz_at_local().
| Datum timetztypmodin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2471 of file date.c.
References anytime_typmodin(), fb(), PG_GETARG_ARRAYTYPE_P, and PG_RETURN_INT32.
| Datum timetztypmodout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2479 of file date.c.
References anytime_typmodout(), PG_GETARG_INT32, and PG_RETURN_CSTRING.
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().