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/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 1710 of file date.c.
References 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 72 of file date.c.
References ereport, errcode(), errmsg(), ERROR, MAX_TIME_PRECISION, and WARNING.
Referenced by anytime_typmodin(), executeDateTimeMethod(), and transformSQLValueFunction().
Definition at line 51 of file date.c.
References anytime_typmod_check(), ArrayGetIntegerTypmods(), ereport, errcode(), errmsg(), and ERROR.
Referenced by timetypmodin(), and timetztypmodin().
|
static |
Definition at line 94 of file date.c.
References psprintf(), and pstrdup().
Referenced by timetypmodout(), and timetztypmodout().
|
static |
Definition at line 673 of file date.c.
References date2timestamp_opt_overflow().
Referenced by date_mi_interval(), date_pl_interval(), date_timestamp(), datetime_timestamp(), and in_range_date_interval().
double date2timestamp_no_overflow | ( | DateADT | dateVal | ) |
Definition at line 785 of file date.c.
References DATE_IS_NOBEGIN, DATE_IS_NOEND, and USECS_PER_DAY.
Referenced by convert_timevalue_to_scalar().
Definition at line 629 of file date.c.
References DATE_IS_NOBEGIN, DATE_IS_NOEND, ereport, errcode(), errmsg(), ERROR, POSTGRES_EPOCH_JDATE, TIMESTAMP_END_JULIAN, TIMESTAMP_NOBEGIN, TIMESTAMP_NOEND, and USECS_PER_DAY.
Referenced by date2timestamp(), and date_cmp_timestamp_internal().
|
static |
Definition at line 769 of file date.c.
References date2timestamptz_opt_overflow().
Referenced by date_timestamptz().
TimestampTz date2timestamptz_opt_overflow | ( | DateADT | dateVal, |
int * | overflow | ||
) |
Definition at line 689 of file date.c.
References DATE_IS_NOBEGIN, DATE_IS_NOEND, DetermineTimeZoneOffset(), ereport, errcode(), errmsg(), ERROR, 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 date2timestamptz(), and date_cmp_timestamptz_internal().
Datum date_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 445 of file date.c.
References 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 879 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_INT32.
Definition at line 808 of file date.c.
References Assert(), date2timestamp_opt_overflow(), 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 963 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_INT32.
int32 date_cmp_timestamptz_internal | ( | DateADT | dateVal, |
TimestampTz | dt2 | ||
) |
Definition at line 888 of file date.c.
References date2timestamptz_opt_overflow(), 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 467 of file date.c.
References DateADTGetDatum(), DATEVAL_NOBEGIN, and DatumGetDateADT().
Referenced by date_skipsupport().
Datum date_eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 391 of file date.c.
References PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Referenced by gbt_dateeq().
Datum date_eq_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 825 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum date_eq_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 909 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum date_finite | ( | PG_FUNCTION_ARGS | ) |
Definition at line 524 of file date.c.
References DATE_NOT_FINITE, PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Datum date_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 436 of file date.c.
References PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Referenced by gbt_datege().
Datum date_ge_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 870 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum date_ge_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 954 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum date_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 427 of file date.c.
References PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Referenced by gbt_dategt().
Datum date_gt_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 852 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum date_gt_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 936 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum date_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 114 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(), 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 483 of file date.c.
References DateADTGetDatum(), DATEVAL_NOEND, and DatumGetDateADT().
Referenced by date_skipsupport().
Datum date_larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 532 of file date.c.
References PG_GETARG_DATEADT, and PG_RETURN_DATEADT.
Datum date_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 418 of file date.c.
References PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Referenced by gbt_datele().
Datum date_le_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 861 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum date_le_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 945 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum date_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 409 of file date.c.
References PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Referenced by gbt_datelt().
Datum date_lt_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 843 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum date_lt_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 927 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum date_mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 552 of file date.c.
References DATE_NOT_FINITE, ereport, errcode(), errmsg(), ERROR, 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 1331 of file date.c.
References date2timestamp(), DirectFunctionCall2, PG_GETARG_DATEADT, PG_GETARG_INTERVAL_P, PointerGetDatum(), timestamp_mi_interval(), and TimestampGetDatum().
Datum date_mii | ( | PG_FUNCTION_ARGS | ) |
Definition at line 593 of file date.c.
References DATE_NOT_FINITE, days, ereport, errcode(), errmsg(), ERROR, IS_VALID_DATE, PG_GETARG_DATEADT, PG_GETARG_INT32, and PG_RETURN_DATEADT.
Datum date_ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 400 of file date.c.
References PG_GETARG_DATEADT, and PG_RETURN_BOOL.
Datum date_ne_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 834 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum date_ne_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 918 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum date_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 185 of file date.c.
References buf, DATE_NOT_FINITE, DateStyle, EncodeDateOnly(), EncodeSpecialDate(), 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 1311 of file date.c.
References date2timestamp(), DirectFunctionCall2, PG_GETARG_DATEADT, PG_GETARG_INTERVAL_P, PointerGetDatum(), timestamp_pl_interval(), and TimestampGetDatum().
Datum date_pli | ( | PG_FUNCTION_ARGS | ) |
Definition at line 569 of file date.c.
References DATE_NOT_FINITE, days, ereport, errcode(), errmsg(), ERROR, IS_VALID_DATE, PG_GETARG_DATEADT, PG_GETARG_INT32, and PG_RETURN_DATEADT.
Datum date_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 210 of file date.c.
References buf, DATE_NOT_FINITE, ereport, errcode(), errmsg(), ERROR, IS_VALID_DATE, PG_GETARG_POINTER, PG_RETURN_DATEADT, and pq_getmsgint().
Datum date_send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 232 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 499 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 541 of file date.c.
References PG_GETARG_DATEADT, and PG_RETURN_DATEADT.
Datum date_sortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 458 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 1348 of file date.c.
References date2timestamp(), PG_GETARG_DATEADT, and PG_RETURN_TIMESTAMP.
Referenced by executeDateTimeMethod().
Datum date_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1392 of file date.c.
References date2timestamptz(), PG_GETARG_DATEADT, and PG_RETURN_TIMESTAMP.
Referenced by executeDateTimeMethod().
Datum datetime_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2031 of file date.c.
References date2timestamp(), ereport, errcode(), errmsg(), ERROR, 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 2951 of file date.c.
References DATE_IS_NOBEGIN, DATE_IS_NOEND, ereport, errcode(), errmsg(), ERROR, 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.
void EncodeSpecialDate | ( | DateADT | dt, |
char * | str | ||
) |
Definition at line 302 of file date.c.
References DATE_IS_NOBEGIN, DATE_IS_NOEND, EARLY, elog, ERROR, LATE, and str.
Referenced by date_out(), and JsonEncodeDateTime().
Datum extract_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1131 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, 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 2314 of file date.c.
References time_part_common().
Datum extract_timetz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3115 of file date.c.
References timetz_part_common().
bool float_time_overflows | ( | int | hour, |
int | min, | ||
double | sec | ||
) |
Definition at line 1516 of file date.c.
References HOURS_PER_DAY, MINS_PER_HOUR, SECS_PER_MINUTE, USECS_PER_DAY, and USECS_PER_SEC.
Referenced by make_time(), and make_timestamp_internal().
DateADT GetSQLCurrentDate | ( | void | ) |
Definition at line 317 of file date.c.
References date2j(), GetCurrentDateTime(), POSTGRES_EPOCH_JDATE, tm, pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.
Referenced by ExecEvalSQLValueFunction().
Definition at line 350 of file date.c.
References AdjustTimeForTypmod(), GetCurrentTimeUsec(), palloc(), TimeTzADT::time, tm, and tm2timetz().
Referenced by ExecEvalSQLValueFunction().
Definition at line 370 of file date.c.
References AdjustTimeForTypmod(), GetCurrentTimeUsec(), tm, and tm2time().
Referenced by ExecEvalSQLValueFunction().
Datum hashdate | ( | PG_FUNCTION_ARGS | ) |
Datum hashdateextended | ( | PG_FUNCTION_ARGS | ) |
Definition at line 518 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 1104 of file date.c.
References BoolGetDatum(), date2timestamp(), DirectFunctionCall5, 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 2163 of file date.c.
References ereport, errcode(), errmsg(), ERROR, 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 2715 of file date.c.
References ereport, errcode(), errmsg(), ERROR, 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 2077 of file date.c.
References ereport, errcode(), errmsg(), ERROR, INTERVAL_NOT_FINITE, PG_GETARG_INTERVAL_P, PG_RETURN_TIMEADT, Interval::time, and USECS_PER_DAY.
Datum make_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 246 of file date.c.
References date2j(), DTK_DATE_M, ereport, errcode(), errmsg(), ERROR, 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 1642 of file date.c.
References ereport, errcode(), errmsg(), ERROR, 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 1848 of file date.c.
References 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 2760 of file date.c.
References PG_ARGISNULL, PG_GETARG_DATUM, PG_RETURN_BOOL, PG_RETURN_NULL, TIMETZ_GT, and TIMETZ_LT.
Definition at line 1553 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 1799 of file date.c.
References 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 1745 of file date.c.
References PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
Referenced by gbt_timeeq().
Datum time_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1790 of file date.c.
References PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
Referenced by gbt_timege().
Datum time_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1781 of file date.c.
References 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 1439 of file date.c.
References AdjustTimeForTypmod(), DateTimeParseError(), DecodeTimeOnly(), 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 2054 of file date.c.
References Interval::day, Interval::month, palloc(), PG_GETARG_TIMEADT, PG_RETURN_INTERVAL_P, and Interval::time.
Datum time_larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1824 of file date.c.
References PG_GETARG_TIMEADT, and PG_RETURN_TIMEADT.
Datum time_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1772 of file date.c.
References PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
Referenced by gbt_timele().
Datum time_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1763 of file date.c.
References PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
Referenced by gbt_timelt().
Datum time_mi_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2140 of file date.c.
References ereport, errcode(), errmsg(), ERROR, INT64CONST, INTERVAL_NOT_FINITE, PG_GETARG_INTERVAL_P, PG_GETARG_TIMEADT, PG_RETURN_TIMEADT, Interval::time, and USECS_PER_DAY.
Datum time_mi_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2098 of file date.c.
References Interval::day, Interval::month, palloc(), 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 1754 of file date.c.
References PG_GETARG_TIMEADT, and PG_RETURN_BOOL.
Datum time_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1566 of file date.c.
References buf, DateStyle, EncodeTimeOnly(), MAXDATELEN, PG_GETARG_TIMEADT, PG_RETURN_CSTRING, pstrdup(), time2tm(), and tm.
Referenced by ExecGetJsonValueItemString().
bool time_overflows | ( | int | hour, |
int | min, | ||
int | sec, | ||
fsec_t | fsec | ||
) |
Definition at line 1492 of file date.c.
References 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 2308 of file date.c.
References time_part_common().
|
static |
Definition at line 2205 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, 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 2117 of file date.c.
References ereport, errcode(), errmsg(), ERROR, INT64CONST, INTERVAL_NOT_FINITE, PG_GETARG_INTERVAL_P, PG_GETARG_TIMEADT, PG_RETURN_TIMEADT, Interval::time, and USECS_PER_DAY.
Datum time_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1586 of file date.c.
References AdjustTimeForTypmod(), buf, ereport, errcode(), errmsg(), ERROR, 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 1690 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 1612 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 1833 of file date.c.
References PG_GETARG_TIMEADT, and PG_RETURN_TIMEADT.
Datum time_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1670 of file date.c.
References SupportRequestSimplify::fcall, IsA, MAX_TIME_PRECISION, PG_GETARG_POINTER, PG_RETURN_POINTER, and TemporalSimplify().
Datum time_timetz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2893 of file date.c.
References DetermineTimeZoneOffset(), GetCurrentDateTime(), palloc(), PG_GETARG_TIMEADT, PG_RETURN_TIMETZADT_P, session_timezone, TimeTzADT::time, time2tm(), tm, and TimeTzADT::zone.
Referenced by castTimeToTimeTz(), and executeDateTimeMethod().
Datum timestamp_cmp_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1026 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_INT32.
Datum timestamp_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1362 of file date.c.
References date2j(), DATE_NOBEGIN, DATE_NOEND, ereport, errcode(), errmsg(), ERROR, PG_GETARG_TIMESTAMP, PG_RETURN_DATEADT, 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 executeDateTimeMethod().
Datum timestamp_eq_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 972 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum timestamp_ge_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1017 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum timestamp_gt_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 999 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum timestamp_le_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1008 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum timestamp_lt_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 990 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum timestamp_ne_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 981 of file date.c.
References date_cmp_timestamp_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMP, and PG_RETURN_BOOL.
Datum timestamp_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1970 of file date.c.
References ereport, errcode(), errmsg(), ERROR, 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_cmp_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1089 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_INT32.
Datum timestamptz_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1407 of file date.c.
References date2j(), DATE_NOBEGIN, DATE_NOEND, ereport, errcode(), errmsg(), ERROR, PG_GETARG_TIMESTAMP, PG_RETURN_DATEADT, 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 executeDateTimeMethod().
Datum timestamptz_eq_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1035 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum timestamptz_ge_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1080 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum timestamptz_gt_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1062 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum timestamptz_le_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1071 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum timestamptz_lt_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1053 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum timestamptz_ne_date | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1044 of file date.c.
References date_cmp_timestamptz_internal(), PG_GETARG_DATEADT, PG_GETARG_TIMESTAMPTZ, and PG_RETURN_BOOL.
Datum timestamptz_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2000 of file date.c.
References ereport, errcode(), errmsg(), ERROR, 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 2919 of file date.c.
References ereport, errcode(), errmsg(), ERROR, palloc(), 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 1623 of file date.c.
References anytime_typmodin(), PG_GETARG_ARRAYTYPE_P, and PG_RETURN_INT32.
Datum timetypmodout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1631 of file date.c.
References anytime_typmodout(), PG_GETARG_INT32, and PG_RETURN_CSTRING.
Definition at line 2468 of file date.c.
References 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 3230 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 2589 of file date.c.
References PG_GETARG_TIMETZADT_P, PG_RETURN_INT32, and timetz_cmp_internal().
Referenced by compareDatetime().
Definition at line 2508 of file date.c.
References TimeTzADT::time, USECS_PER_SEC, and TimeTzADT::zone.
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 2535 of file date.c.
References PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
Datum timetz_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2580 of file date.c.
References PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
Datum timetz_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2571 of file date.c.
References PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
Datum timetz_hash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2598 of file date.c.
References DatumGetUInt32(), DirectFunctionCall1, hash_uint32(), hashint8(), Int64GetDatumFast, sort-test::key, PG_GETARG_TIMETZADT_P, and PG_RETURN_UINT32.
Datum timetz_hash_extended | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2614 of file date.c.
References DatumGetInt64(), DatumGetUInt64(), DirectFunctionCall2, hash_uint32_extended(), hashint8extended(), Int64GetDatumFast, sort-test::key, PG_GETARG_DATUM, PG_GETARG_TIMETZADT_P, and PG_RETURN_UINT64.
Datum timetz_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2338 of file date.c.
References AdjustTimeForTypmod(), DateTimeParseError(), DecodeTimeOnly(), MAXDATEFIELDS, MAXDATELEN, palloc(), 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 3187 of file date.c.
References DatumGetCString(), DirectFunctionCall1, ereport, errcode(), errmsg(), ERROR, if(), INT64CONST, INTERVAL_NOT_FINITE, interval_out(), palloc(), 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 2630 of file date.c.
References PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, and timetz_cmp_internal().
Datum timetz_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2562 of file date.c.
References PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
Datum timetz_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2553 of file date.c.
References PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
Datum timetz_mi_interval | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2688 of file date.c.
References ereport, errcode(), errmsg(), ERROR, INT64CONST, INTERVAL_NOT_FINITE, palloc(), PG_GETARG_INTERVAL_P, PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, Interval::time, TimeTzADT::time, USECS_PER_DAY, and TimeTzADT::zone.
Datum timetz_ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2544 of file date.c.
References PG_GETARG_TIMETZADT_P, PG_RETURN_BOOL, and timetz_cmp_internal().
Datum timetz_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2379 of file date.c.
References buf, DateStyle, EncodeTimeOnly(), MAXDATELEN, PG_GETARG_TIMETZADT_P, PG_RETURN_CSTRING, pstrdup(), timetz2tm(), and tm.
Referenced by ExecGetJsonValueItemString().
Datum timetz_part | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3109 of file date.c.
References timetz_part_common().
|
static |
Definition at line 2992 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, 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 2661 of file date.c.
References ereport, errcode(), errmsg(), ERROR, INT64CONST, INTERVAL_NOT_FINITE, palloc(), PG_GETARG_INTERVAL_P, PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, Interval::time, TimeTzADT::time, USECS_PER_DAY, and TimeTzADT::zone.
Datum timetz_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2400 of file date.c.
References AdjustTimeForTypmod(), buf, ereport, errcode(), errmsg(), ERROR, INT64CONST, palloc(), 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 2490 of file date.c.
References AdjustTimeForTypmod(), palloc(), 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 2436 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 2644 of file date.c.
References PG_GETARG_TIMETZADT_P, PG_RETURN_TIMETZADT_P, and timetz_cmp_internal().
Datum timetz_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2880 of file date.c.
References PG_GETARG_TIMETZADT_P, PG_RETURN_TIMEADT, and TimeTzADT::time.
Referenced by executeDateTimeMethod().
Datum timetz_zone | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3125 of file date.c.
References DecodeTimezoneName(), DetermineTimeZoneAbbrevOffsetTS(), ereport, errcode(), errmsg(), ERROR, GetCurrentTransactionStartTimestamp(), if(), INT64CONST, now(), palloc(), 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 2448 of file date.c.
References anytime_typmodin(), PG_GETARG_ARRAYTYPE_P, and PG_RETURN_INT32.
Datum timetztypmodout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2456 of file date.c.
References anytime_typmodout(), PG_GETARG_INT32, and PG_RETURN_CSTRING.
Definition at line 1481 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 2328 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().