Eneboo - Documentación para desarrolladores
|
#include <math.h>
#include <limits.h>
#include <float.h>
#include "fmgr.h"
#include "pgtime.h"
Ir al código fuente de este archivo.
Clases | |
struct | Interval |
'defines' | |
#define | MAX_TIMESTAMP_PRECISION 6 |
#define | MAX_INTERVAL_PRECISION 6 |
#define | DAYS_PER_YEAR 365.25 |
#define | MONTHS_PER_YEAR 12 |
#define | DAYS_PER_MONTH 30 |
#define | HOURS_PER_DAY 24 |
#define | SECS_PER_YEAR (36525 * 864) |
#define | SECS_PER_DAY 86400 |
#define | SECS_PER_HOUR 3600 |
#define | SECS_PER_MINUTE 60 |
#define | MINS_PER_HOUR 60 |
#define | DatumGetTimestamp(X) ((Timestamp) DatumGetFloat8(X)) |
#define | DatumGetTimestampTz(X) ((TimestampTz) DatumGetFloat8(X)) |
#define | DatumGetIntervalP(X) ((Interval *) DatumGetPointer(X)) |
#define | TimestampGetDatum(X) Float8GetDatum(X) |
#define | TimestampTzGetDatum(X) Float8GetDatum(X) |
#define | IntervalPGetDatum(X) PointerGetDatum(X) |
#define | PG_GETARG_TIMESTAMP(n) DatumGetTimestamp(PG_GETARG_DATUM(n)) |
#define | PG_GETARG_TIMESTAMPTZ(n) DatumGetTimestampTz(PG_GETARG_DATUM(n)) |
#define | PG_GETARG_INTERVAL_P(n) DatumGetIntervalP(PG_GETARG_DATUM(n)) |
#define | PG_RETURN_TIMESTAMP(x) return TimestampGetDatum(x) |
#define | PG_RETURN_TIMESTAMPTZ(x) return TimestampTzGetDatum(x) |
#define | PG_RETURN_INTERVAL_P(x) return IntervalPGetDatum(x) |
#define | DT_NOBEGIN (-DBL_MAX) |
#define | DT_NOEND (DBL_MAX) |
#define | TIMESTAMP_NOBEGIN(j) do {(j) = DT_NOBEGIN;} while (0) |
#define | TIMESTAMP_IS_NOBEGIN(j) ((j) == DT_NOBEGIN) |
#define | TIMESTAMP_NOEND(j) do {(j) = DT_NOEND;} while (0) |
#define | TIMESTAMP_IS_NOEND(j) ((j) == DT_NOEND) |
#define | TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j)) |
#define | TS_PREC_INV 1000000.0 |
#define | TSROUND(j) (rint(((double) (j)) * TS_PREC_INV) / TS_PREC_INV) |
#define | TIMESTAMP_MASK(b) (1 << (b)) |
#define | INTERVAL_MASK(b) (1 << (b)) |
#define | INTERVAL_FULL_RANGE (0x7FFF) |
#define | INTERVAL_RANGE_MASK (0x7FFF) |
#define | INTERVAL_FULL_PRECISION (0xFFFF) |
#define | INTERVAL_PRECISION_MASK (0xFFFF) |
#define | INTERVAL_TYPMOD(p, r) ((((r) & INTERVAL_RANGE_MASK) << 16) | ((p) & INTERVAL_PRECISION_MASK)) |
#define | INTERVAL_PRECISION(t) ((t) & INTERVAL_PRECISION_MASK) |
#define | INTERVAL_RANGE(t) (((t) >> 16) & INTERVAL_RANGE_MASK) |
#define | timestamptz_cmp_internal(dt1, dt2) timestamp_cmp_internal(dt1, dt2) |
'typedefs' | |
typedef double | Timestamp |
typedef double | TimestampTz |
typedef double | fsec_t |
Funciones | |
Datum | timestamp_in (PG_FUNCTION_ARGS) |
Datum | timestamp_out (PG_FUNCTION_ARGS) |
Datum | timestamp_recv (PG_FUNCTION_ARGS) |
Datum | timestamp_send (PG_FUNCTION_ARGS) |
Datum | timestamp_scale (PG_FUNCTION_ARGS) |
Datum | timestamp_eq (PG_FUNCTION_ARGS) |
Datum | timestamp_ne (PG_FUNCTION_ARGS) |
Datum | timestamp_lt (PG_FUNCTION_ARGS) |
Datum | timestamp_le (PG_FUNCTION_ARGS) |
Datum | timestamp_ge (PG_FUNCTION_ARGS) |
Datum | timestamp_gt (PG_FUNCTION_ARGS) |
Datum | timestamp_finite (PG_FUNCTION_ARGS) |
Datum | timestamp_cmp (PG_FUNCTION_ARGS) |
Datum | timestamp_smaller (PG_FUNCTION_ARGS) |
Datum | timestamp_larger (PG_FUNCTION_ARGS) |
Datum | timestamp_eq_timestamptz (PG_FUNCTION_ARGS) |
Datum | timestamp_ne_timestamptz (PG_FUNCTION_ARGS) |
Datum | timestamp_lt_timestamptz (PG_FUNCTION_ARGS) |
Datum | timestamp_le_timestamptz (PG_FUNCTION_ARGS) |
Datum | timestamp_gt_timestamptz (PG_FUNCTION_ARGS) |
Datum | timestamp_ge_timestamptz (PG_FUNCTION_ARGS) |
Datum | timestamp_cmp_timestamptz (PG_FUNCTION_ARGS) |
Datum | timestamptz_eq_timestamp (PG_FUNCTION_ARGS) |
Datum | timestamptz_ne_timestamp (PG_FUNCTION_ARGS) |
Datum | timestamptz_lt_timestamp (PG_FUNCTION_ARGS) |
Datum | timestamptz_le_timestamp (PG_FUNCTION_ARGS) |
Datum | timestamptz_gt_timestamp (PG_FUNCTION_ARGS) |
Datum | timestamptz_ge_timestamp (PG_FUNCTION_ARGS) |
Datum | timestamptz_cmp_timestamp (PG_FUNCTION_ARGS) |
Datum | interval_in (PG_FUNCTION_ARGS) |
Datum | interval_out (PG_FUNCTION_ARGS) |
Datum | interval_recv (PG_FUNCTION_ARGS) |
Datum | interval_send (PG_FUNCTION_ARGS) |
Datum | interval_scale (PG_FUNCTION_ARGS) |
Datum | interval_eq (PG_FUNCTION_ARGS) |
Datum | interval_ne (PG_FUNCTION_ARGS) |
Datum | interval_lt (PG_FUNCTION_ARGS) |
Datum | interval_le (PG_FUNCTION_ARGS) |
Datum | interval_ge (PG_FUNCTION_ARGS) |
Datum | interval_gt (PG_FUNCTION_ARGS) |
Datum | interval_finite (PG_FUNCTION_ARGS) |
Datum | interval_cmp (PG_FUNCTION_ARGS) |
Datum | interval_hash (PG_FUNCTION_ARGS) |
Datum | interval_smaller (PG_FUNCTION_ARGS) |
Datum | interval_larger (PG_FUNCTION_ARGS) |
Datum | interval_justify_hours (PG_FUNCTION_ARGS) |
Datum | interval_justify_days (PG_FUNCTION_ARGS) |
Datum | timestamp_text (PG_FUNCTION_ARGS) |
Datum | text_timestamp (PG_FUNCTION_ARGS) |
Datum | interval_text (PG_FUNCTION_ARGS) |
Datum | text_interval (PG_FUNCTION_ARGS) |
Datum | timestamp_trunc (PG_FUNCTION_ARGS) |
Datum | interval_trunc (PG_FUNCTION_ARGS) |
Datum | timestamp_part (PG_FUNCTION_ARGS) |
Datum | interval_part (PG_FUNCTION_ARGS) |
Datum | timestamp_zone (PG_FUNCTION_ARGS) |
Datum | timestamp_izone (PG_FUNCTION_ARGS) |
Datum | timestamp_timestamptz (PG_FUNCTION_ARGS) |
Datum | timestamptz_in (PG_FUNCTION_ARGS) |
Datum | timestamptz_out (PG_FUNCTION_ARGS) |
Datum | timestamptz_recv (PG_FUNCTION_ARGS) |
Datum | timestamptz_send (PG_FUNCTION_ARGS) |
Datum | timestamptz_scale (PG_FUNCTION_ARGS) |
Datum | timestamptz_timestamp (PG_FUNCTION_ARGS) |
Datum | timestamptz_zone (PG_FUNCTION_ARGS) |
Datum | timestamptz_izone (PG_FUNCTION_ARGS) |
Datum | timestamptz_timestamptz (PG_FUNCTION_ARGS) |
Datum | interval_um (PG_FUNCTION_ARGS) |
Datum | interval_pl (PG_FUNCTION_ARGS) |
Datum | interval_mi (PG_FUNCTION_ARGS) |
Datum | interval_mul (PG_FUNCTION_ARGS) |
Datum | mul_d_interval (PG_FUNCTION_ARGS) |
Datum | interval_div (PG_FUNCTION_ARGS) |
Datum | interval_accum (PG_FUNCTION_ARGS) |
Datum | interval_avg (PG_FUNCTION_ARGS) |
Datum | timestamp_mi (PG_FUNCTION_ARGS) |
Datum | timestamp_pl_interval (PG_FUNCTION_ARGS) |
Datum | timestamp_mi_interval (PG_FUNCTION_ARGS) |
Datum | timestamp_age (PG_FUNCTION_ARGS) |
Datum | overlaps_timestamp (PG_FUNCTION_ARGS) |
Datum | timestamptz_text (PG_FUNCTION_ARGS) |
Datum | text_timestamptz (PG_FUNCTION_ARGS) |
Datum | timestamptz_pl_interval (PG_FUNCTION_ARGS) |
Datum | timestamptz_mi_interval (PG_FUNCTION_ARGS) |
Datum | timestamptz_age (PG_FUNCTION_ARGS) |
Datum | timestamptz_trunc (PG_FUNCTION_ARGS) |
Datum | timestamptz_part (PG_FUNCTION_ARGS) |
Datum | now (PG_FUNCTION_ARGS) |
Datum | pgsql_postmaster_start_time (PG_FUNCTION_ARGS) |
TimestampTz | GetCurrentTimestamp (void) |
TimestampTz | time_t_to_timestamptz (time_t tm) |
int | tm2timestamp (struct pg_tm *tm, fsec_t fsec, int *tzp, Timestamp *dt) |
int | timestamp2tm (Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, char **tzn, pg_tz *attimezone) |
void | dt2time (Timestamp dt, int *hour, int *min, int *sec, fsec_t *fsec) |
int | interval2tm (Interval span, struct pg_tm *tm, fsec_t *fsec) |
int | tm2interval (struct pg_tm *tm, fsec_t fsec, Interval *span) |
Timestamp | SetEpochTimestamp (void) |
void | GetEpochTime (struct pg_tm *tm) |
int | timestamp_cmp_internal (Timestamp dt1, Timestamp dt2) |
void | isoweek2date (int woy, int *year, int *mon, int *mday) |
int | date2isoweek (int year, int mon, int mday) |
int | date2isoyear (int year, int mon, int mday) |
Variables | |
TimestampTz | PgStartTime |
#define DatumGetIntervalP | ( | X | ) | ((Interval *) DatumGetPointer(X)) |
#define DatumGetTimestamp | ( | X | ) | ((Timestamp) DatumGetFloat8(X)) |
#define DatumGetTimestampTz | ( | X | ) | ((TimestampTz) DatumGetFloat8(X)) |
#define DAYS_PER_MONTH 30 |
#define DAYS_PER_YEAR 365.25 |
#define DT_NOBEGIN (-DBL_MAX) |
#define DT_NOEND (DBL_MAX) |
#define HOURS_PER_DAY 24 |
#define INTERVAL_FULL_PRECISION (0xFFFF) |
#define INTERVAL_FULL_RANGE (0x7FFF) |
#define INTERVAL_PRECISION_MASK (0xFFFF) |
#define INTERVAL_RANGE_MASK (0x7FFF) |
#define INTERVAL_TYPMOD | ( | p, | |
r | |||
) | ((((r) & INTERVAL_RANGE_MASK) << 16) | ((p) & INTERVAL_PRECISION_MASK)) |
#define IntervalPGetDatum | ( | X | ) | PointerGetDatum(X) |
#define MAX_INTERVAL_PRECISION 6 |
#define MAX_TIMESTAMP_PRECISION 6 |
#define MINS_PER_HOUR 60 |
#define MONTHS_PER_YEAR 12 |
#define PG_GETARG_INTERVAL_P | ( | n | ) | DatumGetIntervalP(PG_GETARG_DATUM(n)) |
#define PG_GETARG_TIMESTAMP | ( | n | ) | DatumGetTimestamp(PG_GETARG_DATUM(n)) |
#define PG_GETARG_TIMESTAMPTZ | ( | n | ) | DatumGetTimestampTz(PG_GETARG_DATUM(n)) |
#define PG_RETURN_INTERVAL_P | ( | x | ) | return IntervalPGetDatum(x) |
#define PG_RETURN_TIMESTAMP | ( | x | ) | return TimestampGetDatum(x) |
#define PG_RETURN_TIMESTAMPTZ | ( | x | ) | return TimestampTzGetDatum(x) |
#define SECS_PER_DAY 86400 |
#define SECS_PER_HOUR 3600 |
#define SECS_PER_MINUTE 60 |
#define SECS_PER_YEAR (36525 * 864) |
#define TIMESTAMP_IS_NOBEGIN | ( | j | ) | ((j) == DT_NOBEGIN) |
#define TIMESTAMP_IS_NOEND | ( | j | ) | ((j) == DT_NOEND) |
#define TIMESTAMP_NOBEGIN | ( | j | ) | do {(j) = DT_NOBEGIN;} while (0) |
#define TIMESTAMP_NOEND | ( | j | ) | do {(j) = DT_NOEND;} while (0) |
#define TIMESTAMP_NOT_FINITE | ( | j | ) | (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j)) |
#define TimestampGetDatum | ( | X | ) | Float8GetDatum(X) |
#define timestamptz_cmp_internal | ( | dt1, | |
dt2 | |||
) | timestamp_cmp_internal(dt1, dt2) |
#define TimestampTzGetDatum | ( | X | ) | Float8GetDatum(X) |
#define TS_PREC_INV 1000000.0 |
#define TSROUND | ( | j | ) | (rint(((double) (j)) * TS_PREC_INV) / TS_PREC_INV) |
typedef double fsec_t |
typedef double Timestamp |
typedef double TimestampTz |
TimestampTz GetCurrentTimestamp | ( | void | ) |
void GetEpochTime | ( | struct pg_tm * | tm | ) |
Datum interval_accum | ( | PG_FUNCTION_ARGS | ) |
Datum interval_avg | ( | PG_FUNCTION_ARGS | ) |
Datum interval_cmp | ( | PG_FUNCTION_ARGS | ) |
Datum interval_div | ( | PG_FUNCTION_ARGS | ) |
Datum interval_eq | ( | PG_FUNCTION_ARGS | ) |
Datum interval_finite | ( | PG_FUNCTION_ARGS | ) |
Datum interval_ge | ( | PG_FUNCTION_ARGS | ) |
Datum interval_gt | ( | PG_FUNCTION_ARGS | ) |
Datum interval_hash | ( | PG_FUNCTION_ARGS | ) |
Datum interval_in | ( | PG_FUNCTION_ARGS | ) |
Datum interval_justify_days | ( | PG_FUNCTION_ARGS | ) |
Datum interval_justify_hours | ( | PG_FUNCTION_ARGS | ) |
Datum interval_larger | ( | PG_FUNCTION_ARGS | ) |
Datum interval_le | ( | PG_FUNCTION_ARGS | ) |
Datum interval_lt | ( | PG_FUNCTION_ARGS | ) |
Datum interval_mi | ( | PG_FUNCTION_ARGS | ) |
Datum interval_mul | ( | PG_FUNCTION_ARGS | ) |
Datum interval_ne | ( | PG_FUNCTION_ARGS | ) |
Datum interval_out | ( | PG_FUNCTION_ARGS | ) |
Datum interval_part | ( | PG_FUNCTION_ARGS | ) |
Datum interval_pl | ( | PG_FUNCTION_ARGS | ) |
Datum interval_recv | ( | PG_FUNCTION_ARGS | ) |
Datum interval_scale | ( | PG_FUNCTION_ARGS | ) |
Datum interval_send | ( | PG_FUNCTION_ARGS | ) |
Datum interval_smaller | ( | PG_FUNCTION_ARGS | ) |
Datum interval_text | ( | PG_FUNCTION_ARGS | ) |
Datum interval_trunc | ( | PG_FUNCTION_ARGS | ) |
Datum interval_um | ( | PG_FUNCTION_ARGS | ) |
Datum mul_d_interval | ( | PG_FUNCTION_ARGS | ) |
Datum now | ( | PG_FUNCTION_ARGS | ) |
Datum overlaps_timestamp | ( | PG_FUNCTION_ARGS | ) |
Datum pgsql_postmaster_start_time | ( | PG_FUNCTION_ARGS | ) |
Timestamp SetEpochTimestamp | ( | void | ) |
Datum text_interval | ( | PG_FUNCTION_ARGS | ) |
Datum text_timestamp | ( | PG_FUNCTION_ARGS | ) |
Datum text_timestamptz | ( | PG_FUNCTION_ARGS | ) |
TimestampTz time_t_to_timestamptz | ( | time_t | tm | ) |
int timestamp2tm | ( | Timestamp | dt, |
int * | tzp, | ||
struct pg_tm * | tm, | ||
fsec_t * | fsec, | ||
char ** | tzn, | ||
pg_tz * | attimezone | ||
) |
Datum timestamp_age | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_cmp | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_cmp_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_eq | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_eq_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_finite | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_ge | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_ge_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_gt | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_gt_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_in | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_izone | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_larger | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_le | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_le_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_lt | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_lt_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_mi | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_mi_interval | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_ne | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_ne_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_out | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_part | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_pl_interval | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_recv | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_scale | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_send | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_smaller | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_text | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_trunc | ( | PG_FUNCTION_ARGS | ) |
Datum timestamp_zone | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_age | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_cmp_timestamp | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_eq_timestamp | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_ge_timestamp | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_gt_timestamp | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_in | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_izone | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_le_timestamp | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_lt_timestamp | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_mi_interval | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_ne_timestamp | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_out | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_part | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_pl_interval | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_recv | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_scale | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_send | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_text | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_timestamp | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_timestamptz | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_trunc | ( | PG_FUNCTION_ARGS | ) |
Datum timestamptz_zone | ( | PG_FUNCTION_ARGS | ) |