45#error -ffast-math is known to break this code
64 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
65 errmsg(
"invalid type modifier")));
76 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
77 errmsg(
"TIME(%d)%s precision must not be negative",
78 typmod, (istz ?
" WITH TIME ZONE" :
""))));
82 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
83 errmsg(
"TIME(%d)%s precision reduced to maximum allowed, %d",
84 typmod, (istz ?
" WITH TIME ZONE" :
""),
96 const char *tz = istz ?
" with time zone" :
" without time zone";
99 return psprintf(
"(%d)%s", (
int) typmod, tz);
117 Node *escontext = fcinfo->context;
135 &dtype,
tm, &fsec, &tzp, &extra);
167 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
168 errmsg(
"date out of range: \"%s\"",
str)));
175 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
176 errmsg(
"date out of range: \"%s\"",
str)));
222 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
223 errmsg(
"date out of range")));
265 (
errcode(ERRCODE_DATETIME_FIELD_OVERFLOW),
266 errmsg(
"date field value out of range: %d-%02d-%02d",
275 (
errcode(ERRCODE_DATETIME_FIELD_OVERFLOW),
276 errmsg(
"date field value out of range: %d-%02d-%02d",
282 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
283 errmsg(
"date out of range: %d-%02d-%02d",
291 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
292 errmsg(
"date out of range: %d-%02d-%02d",
309 elog(
ERROR,
"invalid argument for EncodeSpecialDate");
321 static int cache_year = 0;
322 static int cache_mon = 0;
323 static int cache_mday = 0;
450 if (dateVal1 < dateVal2)
452 else if (dateVal1 > dateVal2)
559 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
560 errmsg(
"cannot subtract infinite dates")));
578 result = dateVal +
days;
581 if ((
days >= 0 ? (result < dateVal) : (result > dateVal)) ||
584 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
585 errmsg(
"date out of range")));
602 result = dateVal -
days;
605 if ((
days >= 0 ? (result > dateVal) : (result < dateVal)) ||
608 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
609 errmsg(
"date out of range")));
657 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
658 errmsg(
"date out of range for timestamp")));
720 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
721 errmsg(
"date out of range for timestamp")));
756 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
757 errmsg(
"date out of range for timestamp")));
1186 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1187 errmsg(
"unit \"%s\" not supported for type %s",
1206 intresult = (mon - 1) / 3 + 1;
1218 intresult = year - 1;
1224 intresult = year / 10;
1226 intresult = -((8 - (year - 1)) / 10);
1232 intresult = (year + 99) / 100;
1234 intresult = -((99 - (year - 1)) / 100);
1240 intresult = (year + 999) / 1000;
1242 intresult = -((999 - (year - 1)) / 1000);
1264 intresult =
date2j(year, mon, mday) -
date2j(year, 1, 1) + 1;
1269 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1270 errmsg(
"unit \"%s\" not supported for type %s",
1285 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1286 errmsg(
"unit \"%s\" not supported for type %s",
1294 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1295 errmsg(
"unit \"%s\" not recognized for type %s",
1418 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
1419 errmsg(
"timestamp out of range")));
1505 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
1506 errmsg(
"timestamp out of range")));
1528 Node *escontext = fcinfo->context;
1546 &dtype,
tm, &fsec, &tz, &extra);
1682 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
1683 errmsg(
"time out of range")));
1734 (
errcode(ERRCODE_DATETIME_FIELD_OVERFLOW),
1735 errmsg(
"time field value out of range: %d:%02d:%02g",
1817 *time = ((*time + TimeOffsets[typmod]) / TimeScales[typmod]) *
1820 *time = -((((-*time) + TimeOffsets[typmod]) / TimeScales[typmod]) *
1821 TimeScales[typmod]);
1945#define TIMEADT_GT(t1,t2) \
1946 (DatumGetTimeADT(t1) > DatumGetTimeADT(t2))
1947#define TIMEADT_LT(t1,t2) \
1948 (DatumGetTimeADT(t1) < DatumGetTimeADT(t2))
1963 else if (!te1IsNull)
1983 else if (!te2IsNull)
2039 if (te1IsNull || te2IsNull)
2065 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
2066 errmsg(
"timestamp out of range")));
2096 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
2097 errmsg(
"timestamp out of range")));
2125 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
2126 errmsg(
"timestamp out of range")));
2143 result->
time = time;
2166 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
2167 errmsg(
"cannot convert infinite interval to time")));
2190 result->
time = time1 - time2;
2207 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
2208 errmsg(
"cannot add infinite interval to time")));
2210 result = time + span->
time;
2230 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
2231 errmsg(
"cannot subtract infinite interval from time")));
2233 result = time - span->
time;
2259 if (offset->
time < 0)
2261 (
errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
2262 errmsg(
"invalid preceding or following size in window function")));
2272 sum = base - offset->
time;
2361 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2362 errmsg(
"unit \"%s\" not supported for type %s",
2377 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2378 errmsg(
"unit \"%s\" not recognized for type %s",
2427 Node *escontext = fcinfo->context;
2445 &dtype,
tm, &fsec, &tz, &extra);
2498 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
2499 errmsg(
"time out of range")));
2506 (
errcode(ERRCODE_INVALID_TIME_ZONE_DISPLACEMENT_VALUE),
2507 errmsg(
"time zone displacement out of range")));
2751 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
2752 errmsg(
"cannot add infinite interval to time")));
2778 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
2779 errmsg(
"cannot subtract infinite interval from time")));
2811 if (offset->
time < 0)
2813 (
errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
2814 errmsg(
"invalid preceding or following size in window function")));
2857#define TIMETZ_GT(t1,t2) \
2858 DatumGetBool(DirectFunctionCall2(timetz_gt,t1,t2))
2859#define TIMETZ_LT(t1,t2) \
2860 DatumGetBool(DirectFunctionCall2(timetz_lt,t1,t2))
2875 else if (!te1IsNull)
2895 else if (!te2IsNull)
2951 if (te1IsNull || te2IsNull)
2968 result = timetz->
time;
2990 result->
time = time;
3015 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
3016 errmsg(
"timestamp out of range")));
3052 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
3053 errmsg(
"date out of range for timestamp")));
3062 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
3063 errmsg(
"date out of range for timestamp")));
3157 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
3158 errmsg(
"unit \"%s\" not supported for type %s",
3177 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
3178 errmsg(
"unit \"%s\" not recognized for type %s",
3247 (
errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
3248 errmsg(
"timestamp out of range")));
3278 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
3279 errmsg(
"interval time zone \"%s\" must be finite",
3283 if (
zone->month != 0 ||
zone->day != 0)
3285 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
3286 errmsg(
"interval time zone \"%s\" must not include months or days",
#define PG_GETARG_ARRAYTYPE_P(n)
int32 * ArrayGetIntegerTypmods(ArrayType *arr, int *n)
Node * TemporalSimplify(int32 max_precis, Node *node)
int DetermineTimeZoneAbbrevOffsetTS(TimestampTz ts, const char *abbr, pg_tz *tzp, int *isdst)
int DecodeUnits(int field, const char *lowtoken, int *val)
int DecodeTimeOnly(char **field, int *ftype, int nf, int *dtype, struct pg_tm *tm, fsec_t *fsec, int *tzp, DateTimeErrorExtra *extra)
int ParseDateTime(const char *timestr, char *workbuf, size_t buflen, char **field, int *ftype, int maxfields, int *numfields)
int DetermineTimeZoneOffset(struct pg_tm *tm, pg_tz *tzp)
void DateTimeParseError(int dterr, DateTimeErrorExtra *extra, const char *str, const char *datatype, Node *escontext)
void EncodeTimeOnly(struct pg_tm *tm, fsec_t fsec, bool print_tz, int tz, int style, char *str)
int ValidateDate(int fmask, bool isjulian, bool is2digits, bool bc, struct pg_tm *tm)
int DecodeSpecial(int field, const char *lowtoken, int *val)
void j2date(int jd, int *year, int *month, int *day)
void GetCurrentDateTime(struct pg_tm *tm)
void EncodeDateOnly(struct pg_tm *tm, int style, char *str)
int DecodeDateTime(char **field, int *ftype, int nf, int *dtype, struct pg_tm *tm, fsec_t *fsec, int *tzp, DateTimeErrorExtra *extra)
int date2j(int year, int month, int day)
void GetCurrentTimeUsec(struct pg_tm *tm, fsec_t *fsec, int *tzp)
int DecodeTimezoneName(const char *tzname, int *offset, pg_tz **tz)
Numeric int64_to_numeric(int64 val)
Numeric int64_div_fast_to_numeric(int64 val1, int log10val2)
Datum numeric_in(PG_FUNCTION_ARGS)
Datum interval_out(PG_FUNCTION_ARGS)
int timestamp_cmp_internal(Timestamp dt1, Timestamp dt2)
Datum in_range_timestamp_interval(PG_FUNCTION_ARGS)
void GetEpochTime(struct pg_tm *tm)
Datum timestamp_pl_interval(PG_FUNCTION_ARGS)
int date2isoweek(int year, int mon, int mday)
Datum timestamp_mi_interval(PG_FUNCTION_ARGS)
int timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, const char **tzn, pg_tz *attimezone)
Datum now(PG_FUNCTION_ARGS)
int date2isoyear(int year, int mon, int mday)
#define INTERVAL_NOT_FINITE(i)
#define TIMESTAMP_NOBEGIN(j)
#define TIMESTAMP_END_JULIAN
#define IS_VALID_JULIAN(y, m, d)
#define IS_VALID_TIMESTAMP(t)
#define TIMESTAMP_IS_NOEND(j)
#define TIMESTAMP_IS_NOBEGIN(j)
#define TIMESTAMP_NOT_FINITE(j)
#define POSTGRES_EPOCH_JDATE
#define TIMESTAMP_NOEND(j)
Datum timestamp_eq_date(PG_FUNCTION_ARGS)
int32 date_cmp_timestamp_internal(DateADT dateVal, Timestamp dt2)
Datum date_send(PG_FUNCTION_ARGS)
Datum timetz_izone(PG_FUNCTION_ARGS)
DateADT timestamp2date_opt_overflow(Timestamp timestamp, int *overflow)
int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp)
Datum timestamp_ne_date(PG_FUNCTION_ARGS)
Datum date_ne_timestamptz(PG_FUNCTION_ARGS)
Datum date_sortsupport(PG_FUNCTION_ARGS)
Datum date_cmp(PG_FUNCTION_ARGS)
Datum date_le(PG_FUNCTION_ARGS)
Datum time_part(PG_FUNCTION_ARGS)
Datum time_eq(PG_FUNCTION_ARGS)
Datum timetz_send(PG_FUNCTION_ARGS)
Datum timetztypmodout(PG_FUNCTION_ARGS)
#define TIMETZ_GT(t1, t2)
Datum timestamp_ge_date(PG_FUNCTION_ARGS)
static char * anytime_typmodout(bool istz, int32 typmod)
Datum timetz_pl_interval(PG_FUNCTION_ARGS)
Datum timetz_smaller(PG_FUNCTION_ARGS)
Datum timetypmodin(PG_FUNCTION_ARGS)
Datum date_lt_timestamptz(PG_FUNCTION_ARGS)
Datum make_time(PG_FUNCTION_ARGS)
static Datum date_decrement(Relation rel, Datum existing, bool *underflow)
Datum date_larger(PG_FUNCTION_ARGS)
Datum in_range_time_interval(PG_FUNCTION_ARGS)
Datum date_gt_timestamptz(PG_FUNCTION_ARGS)
Datum date_lt_timestamp(PG_FUNCTION_ARGS)
Datum timetz_ne(PG_FUNCTION_ARGS)
Datum time_interval(PG_FUNCTION_ARGS)
Datum date_eq(PG_FUNCTION_ARGS)
Datum timetz_larger(PG_FUNCTION_ARGS)
Datum time_le(PG_FUNCTION_ARGS)
Datum timetz_part(PG_FUNCTION_ARGS)
Datum in_range_timetz_interval(PG_FUNCTION_ARGS)
Datum extract_time(PG_FUNCTION_ARGS)
Datum interval_time(PG_FUNCTION_ARGS)
Datum date_mi_interval(PG_FUNCTION_ARGS)
Datum hashdateextended(PG_FUNCTION_ARGS)
Datum date_eq_timestamptz(PG_FUNCTION_ARGS)
bool float_time_overflows(int hour, int min, double sec)
Datum timetz_gt(PG_FUNCTION_ARGS)
Datum timetz_at_local(PG_FUNCTION_ARGS)
Datum timestamp_gt_date(PG_FUNCTION_ARGS)
Datum date_finite(PG_FUNCTION_ARGS)
Datum in_range_date_interval(PG_FUNCTION_ARGS)
Datum time_cmp(PG_FUNCTION_ARGS)
Datum timestamp_time(PG_FUNCTION_ARGS)
Datum time_mi_time(PG_FUNCTION_ARGS)
Datum time_ge(PG_FUNCTION_ARGS)
int32 anytime_typmod_check(bool istz, int32 typmod)
#define TIMEADT_GT(t1, t2)
Datum datetime_timestamp(PG_FUNCTION_ARGS)
static Datum timetz_part_common(PG_FUNCTION_ARGS, bool retnumeric)
Datum date_timestamptz(PG_FUNCTION_ARGS)
Datum date_ne_timestamp(PG_FUNCTION_ARGS)
Datum timestamptz_ge_date(PG_FUNCTION_ARGS)
Datum date_eq_timestamp(PG_FUNCTION_ARGS)
int tm2time(struct pg_tm *tm, fsec_t fsec, TimeADT *result)
Datum timetz_ge(PG_FUNCTION_ARGS)
Datum timestamp_lt_date(PG_FUNCTION_ARGS)
Datum timestamptz_lt_date(PG_FUNCTION_ARGS)
Datum timetz_cmp(PG_FUNCTION_ARGS)
TimeADT GetSQLLocalTime(int32 typmod)
Datum timetztypmodin(PG_FUNCTION_ARGS)
Datum timetz_recv(PG_FUNCTION_ARGS)
static TimestampTz date2timestamptz(DateADT dateVal)
Datum time_recv(PG_FUNCTION_ARGS)
Datum time_mi_interval(PG_FUNCTION_ARGS)
Datum time_support(PG_FUNCTION_ARGS)
int tm2timetz(struct pg_tm *tm, fsec_t fsec, int tz, TimeTzADT *result)
Datum date_out(PG_FUNCTION_ARGS)
Datum timetz_time(PG_FUNCTION_ARGS)
Datum timetz_in(PG_FUNCTION_ARGS)
Datum time_timetz(PG_FUNCTION_ARGS)
Datum time_lt(PG_FUNCTION_ARGS)
Datum date_in(PG_FUNCTION_ARGS)
Datum date_gt(PG_FUNCTION_ARGS)
bool time_overflows(int hour, int min, int sec, fsec_t fsec)
Datum timetz_mi_interval(PG_FUNCTION_ARGS)
Datum extract_timetz(PG_FUNCTION_ARGS)
Datum date_ge_timestamp(PG_FUNCTION_ARGS)
static int32 anytime_typmodin(bool istz, ArrayType *ta)
Datum date_mii(PG_FUNCTION_ARGS)
Datum date_pl_interval(PG_FUNCTION_ARGS)
Datum overlaps_timetz(PG_FUNCTION_ARGS)
static Datum time_part_common(PG_FUNCTION_ARGS, bool retnumeric)
Datum time_gt(PG_FUNCTION_ARGS)
Datum date_recv(PG_FUNCTION_ARGS)
Datum timetz_lt(PG_FUNCTION_ARGS)
Datum time_out(PG_FUNCTION_ARGS)
Datum date_cmp_timestamp(PG_FUNCTION_ARGS)
Datum time_hash(PG_FUNCTION_ARGS)
Datum time_larger(PG_FUNCTION_ARGS)
#define TIMETZ_LT(t1, t2)
Datum time_smaller(PG_FUNCTION_ARGS)
Datum time_ne(PG_FUNCTION_ARGS)
DateADT GetSQLCurrentDate(void)
Datum timetz_eq(PG_FUNCTION_ARGS)
Datum date_gt_timestamp(PG_FUNCTION_ARGS)
Datum timestamptz_timetz(PG_FUNCTION_ARGS)
void AdjustTimeForTypmod(TimeADT *time, int32 typmod)
Datum date_le_timestamptz(PG_FUNCTION_ARGS)
Datum date_pli(PG_FUNCTION_ARGS)
Datum extract_date(PG_FUNCTION_ARGS)
Datum timestamptz_date(PG_FUNCTION_ARGS)
Datum timetz_le(PG_FUNCTION_ARGS)
Datum date_lt(PG_FUNCTION_ARGS)
Datum timetz_hash(PG_FUNCTION_ARGS)
static Datum date_increment(Relation rel, Datum existing, bool *overflow)
static TimestampTz date2timestamp(DateADT dateVal)
static int timetz_cmp_internal(TimeTzADT *time1, TimeTzADT *time2)
Datum timestamptz_gt_date(PG_FUNCTION_ARGS)
Datum hashdate(PG_FUNCTION_ARGS)
Datum timestamp_date(PG_FUNCTION_ARGS)
Datum date_ge(PG_FUNCTION_ARGS)
Datum time_in(PG_FUNCTION_ARGS)
Datum time_hash_extended(PG_FUNCTION_ARGS)
Datum time_pl_interval(PG_FUNCTION_ARGS)
TimestampTz date2timestamptz_opt_overflow(DateADT dateVal, int *overflow)
Datum datetimetz_timestamptz(PG_FUNCTION_ARGS)
int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec)
Datum timestamptz_ne_date(PG_FUNCTION_ARGS)
Datum date_smaller(PG_FUNCTION_ARGS)
void EncodeSpecialDate(DateADT dt, char *str)
Datum timestamp_le_date(PG_FUNCTION_ARGS)
Datum timetypmodout(PG_FUNCTION_ARGS)
Datum timestamptz_eq_date(PG_FUNCTION_ARGS)
Datum timetz_scale(PG_FUNCTION_ARGS)
Datum timestamptz_cmp_date(PG_FUNCTION_ARGS)
Datum date_ge_timestamptz(PG_FUNCTION_ARGS)
Datum timetz_hash_extended(PG_FUNCTION_ARGS)
Datum date_skipsupport(PG_FUNCTION_ARGS)
Datum timetz_zone(PG_FUNCTION_ARGS)
Datum date_cmp_timestamptz(PG_FUNCTION_ARGS)
DateADT timestamptz2date_opt_overflow(TimestampTz timestamp, int *overflow)
Timestamp date2timestamp_opt_overflow(DateADT dateVal, int *overflow)
int32 date_cmp_timestamptz_internal(DateADT dateVal, TimestampTz dt2)
double date2timestamp_no_overflow(DateADT dateVal)
Datum make_date(PG_FUNCTION_ARGS)
TimeTzADT * GetSQLCurrentTime(int32 typmod)
Datum date_le_timestamp(PG_FUNCTION_ARGS)
Datum time_send(PG_FUNCTION_ARGS)
Datum date_mi(PG_FUNCTION_ARGS)
Datum timestamp_cmp_date(PG_FUNCTION_ARGS)
Datum date_ne(PG_FUNCTION_ARGS)
Datum time_scale(PG_FUNCTION_ARGS)
Datum timestamptz_time(PG_FUNCTION_ARGS)
#define TIMEADT_LT(t1, t2)
Datum timetz_out(PG_FUNCTION_ARGS)
Datum overlaps_time(PG_FUNCTION_ARGS)
Datum date_timestamp(PG_FUNCTION_ARGS)
Datum timestamptz_le_date(PG_FUNCTION_ARGS)
static Datum DateADTGetDatum(DateADT X)
#define PG_RETURN_TIMETZADT_P(x)
#define PG_RETURN_DATEADT(x)
#define DATE_IS_NOBEGIN(j)
#define DATE_NOT_FINITE(j)
#define PG_GETARG_TIMEADT(n)
#define PG_RETURN_TIMEADT(x)
static DateADT DatumGetDateADT(Datum X)
#define MAX_TIME_PRECISION
#define PG_GETARG_TIMETZADT_P(n)
#define PG_GETARG_DATEADT(n)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereturn(context, dummy_value,...)
#define ereport(elevel,...)
#define PG_RETURN_UINT32(x)
#define PG_GETARG_TEXT_PP(n)
#define PG_RETURN_BYTEA_P(x)
#define DirectFunctionCall2(func, arg1, arg2)
#define PG_GETARG_FLOAT8(n)
#define PG_RETURN_FLOAT8(x)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_CSTRING(x)
#define DirectFunctionCall1(func, arg1)
#define PG_GETARG_DATUM(n)
#define PG_GETARG_CSTRING(n)
#define PG_GETARG_INT64(n)
#define PG_RETURN_UINT64(x)
#define PG_RETURN_INT32(x)
#define PG_GETARG_INT32(n)
#define PG_GETARG_BOOL(n)
#define DirectFunctionCall5(func, arg1, arg2, arg3, arg4, arg5)
#define DirectFunctionCall3(func, arg1, arg2, arg3)
#define PG_RETURN_POINTER(x)
#define PG_RETURN_BOOL(x)
static Datum hash_uint32(uint32 k)
static Datum hash_uint32_extended(uint32 k, uint64 seed)
Assert(PointerIsAligned(start, uint64))
Datum hashint8extended(PG_FUNCTION_ARGS)
Datum hashint8(PG_FUNCTION_ARGS)
#define TZNAME_FIXED_OFFSET
static bool pg_neg_s32_overflow(int32 a, int32 *result)
static bool pg_add_s64_overflow(int64 a, int64 b, int64 *result)
if(TABLE==NULL||TABLE_index==NULL)
char * pstrdup(const char *in)
#define IsA(nodeptr, _type_)
static Numeric DatumGetNumeric(Datum X)
#define PG_RETURN_NUMERIC(x)
const char * pg_get_timezone_name(pg_tz *tz)
PGDLLIMPORT pg_tz * session_timezone
static uint32 DatumGetUInt32(Datum X)
static uint64 DatumGetUInt64(Datum X)
#define Int64GetDatumFast(X)
static int64 DatumGetInt64(Datum X)
static Datum PointerGetDatum(const void *X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static char * DatumGetCString(Datum X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)
char * psprintf(const char *fmt,...)
char * downcase_truncate_identifier(const char *ident, int len, bool warn)
struct SkipSupportData * SkipSupport
struct SortSupportData * SortSupport
struct StringInfoData * StringInfo
SkipSupportIncDec decrement
SkipSupportIncDec increment
int(* comparator)(Datum x, Datum y, SortSupport ssup)
int ssup_datum_int32_cmp(Datum x, Datum y, SortSupport ssup)
#define timestamptz_cmp_internal(dt1, dt2)
static Datum TimestampGetDatum(Timestamp X)
#define PG_GETARG_TIMESTAMP(n)
static Datum IntervalPGetDatum(const Interval *X)
#define PG_RETURN_TIMESTAMP(x)
#define PG_GETARG_INTERVAL_P(n)
#define PG_GETARG_TIMESTAMPTZ(n)
#define PG_RETURN_INTERVAL_P(x)
static Size VARSIZE_ANY_EXHDR(const void *PTR)
static char * VARDATA_ANY(const void *PTR)
text * cstring_to_text(const char *s)
void text_to_cstring_buffer(const text *src, char *dst, size_t dst_len)
TimestampTz GetCurrentTransactionStartTimestamp(void)