PostgreSQL Source Code
git master
|
Go to the source code of this file.
Typedefs | |
typedef int64 | timestamp |
typedef int64 | TimestampTz |
Functions | |
timestamp | PGTYPEStimestamp_from_asc (char *str, char **endptr) |
char * | PGTYPEStimestamp_to_asc (timestamp tstamp) |
int | PGTYPEStimestamp_sub (timestamp *ts1, timestamp *ts2, interval *iv) |
int | PGTYPEStimestamp_fmt_asc (timestamp *ts, char *output, int str_len, const char *fmtstr) |
void | PGTYPEStimestamp_current (timestamp *ts) |
int | PGTYPEStimestamp_defmt_asc (const char *str, const char *fmt, timestamp *d) |
int | PGTYPEStimestamp_add_interval (timestamp *tin, interval *span, timestamp *tout) |
int | PGTYPEStimestamp_sub_interval (timestamp *tin, interval *span, timestamp *tout) |
typedef int64 timestamp |
Definition at line 10 of file pgtypes_timestamp.h.
typedef int64 TimestampTz |
Definition at line 11 of file pgtypes_timestamp.h.
Definition at line 858 of file timestamp.c.
References day_tab, isleap, interval::month, MONTHS_PER_YEAR, interval::time, timestamp2tm(), TIMESTAMP_NOT_FINITE, tm, tm2timestamp(), pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.
Referenced by main(), and PGTYPEStimestamp_sub_interval().
void PGTYPEStimestamp_current | ( | timestamp * | ts | ) |
Definition at line 290 of file timestamp.c.
References GetCurrentDateTime(), tm, and tm2timestamp().
Referenced by dtcurrent(), and main().
int PGTYPEStimestamp_defmt_asc | ( | const char * | str, |
const char * | fmt, | ||
timestamp * | d | ||
) |
Definition at line 806 of file timestamp.c.
References fmt, free, i, pgtypes_strdup(), PGTYPEStimestamp_defmt_scan(), and str.
Referenced by dtcvfmtasc(), and main().
int PGTYPEStimestamp_fmt_asc | ( | timestamp * | ts, |
char * | output, | ||
int | str_len, | ||
const char * | fmtstr | ||
) |
Definition at line 778 of file timestamp.c.
References dttofmtasc_replace(), fmtstr(), output, PGTYPESdate_dayofweek(), PGTYPESdate_from_timestamp(), timestamp2tm(), and tm.
Referenced by dttofmtasc(), and main().
timestamp PGTYPEStimestamp_from_asc | ( | char * | str, |
char ** | endptr | ||
) |
Definition at line 202 of file timestamp.c.
References DecodeDateTime(), DTK_DATE, DTK_EARLY, DTK_EPOCH, DTK_LATE, MAXDATEFIELDS, MAXDATELEN, ParseDateTime(), PGTYPES_TS_BAD_TIMESTAMP, SetEpochTimestamp(), str, TIMESTAMP_NOBEGIN, TIMESTAMP_NOEND, tm, and tm2timestamp().
Referenced by dtcvasc(), ecpg_get_data(), and main().
Definition at line 793 of file timestamp.c.
References interval::month, PGTYPES_TS_ERR_EINFTIME, interval::time, and TIMESTAMP_NOT_FINITE.
Referenced by dtsub().
Definition at line 913 of file timestamp.c.
References interval::month, PGTYPEStimestamp_add_interval(), and interval::time.
char* PGTYPEStimestamp_to_asc | ( | timestamp | tstamp | ) |
Definition at line 268 of file timestamp.c.
References buf, DateStyle, EncodeDateTime(), EncodeSpecialTimestamp(), MAXDATELEN, pgtypes_strdup(), PGTYPES_TS_BAD_TIMESTAMP, timestamp2tm(), TIMESTAMP_NOT_FINITE, and tm.
Referenced by dttoasc(), ecpg_store_input(), and main().