|
PostgreSQL Source Code git master
|
#include "postgres_fe.h"#include <time.h>#include <math.h>#include <limits.h>#include "common/string.h"#include "dt.h"#include "pgtypes_error.h"#include "pgtypes_interval.h"#include "pgtypeslib_extern.h"
Go to the source code of this file.
Definition at line 723 of file interval.c.
References fb(), sprintf, and value.
Referenced by EncodeInterval().
|
static |
Definition at line 700 of file interval.c.
References fb(), sprintf, and value.
Referenced by EncodeInterval().
|
static |
Definition at line 680 of file interval.c.
References fb(), sprintf, and value.
Referenced by EncodeInterval().
Definition at line 41 of file interval.c.
References AdjustFractSeconds(), fb(), scale, SECS_PER_DAY, tm, and pg_tm::tm_mday.
Referenced by DecodeInterval(), and DecodeISO8601Interval().
Definition at line 23 of file interval.c.
References fb(), scale, tm, and pg_tm::tm_sec.
Referenced by AdjustFractDays(), DecodeInterval(), and DecodeISO8601Interval().
Definition at line 733 of file interval.c.
References fb(), sprintf, and TrimTrailingZeros().
Referenced by EncodeInterval().
Definition at line 94 of file interval.c.
References tm, pg_tm::tm_hour, pg_tm::tm_mday, pg_tm::tm_min, pg_tm::tm_mon, pg_tm::tm_sec, and pg_tm::tm_year.
Referenced by DecodeInterval(), and DecodeISO8601Interval().
| int DecodeInterval | ( | char ** | field, |
| int * | ftype, | ||
| int | nf, | ||
| int * | dtype, | ||
| struct tm * | tm, | ||
| fsec_t * | fsec | ||
| ) |
Definition at line 326 of file interval.c.
References AdjustFractDays(), AdjustFractSeconds(), AGO, Assert, ClearPgTm(), DAY, DAYS_PER_MONTH, DecodeTime(), DecodeUnits(), DTERR_BAD_FORMAT, DTERR_FIELD_OVERFLOW, DTK_ALL_SECS_M, DTK_CENTURY, DTK_DATE, DTK_DATE_M, DTK_DAY, DTK_DECADE, DTK_DELTA, DTK_HOUR, DTK_M, DTK_MICROSEC, DTK_MILLENNIUM, DTK_MILLISEC, DTK_MINUTE, DTK_MONTH, DTK_NUMBER, DTK_SECOND, DTK_SPECIAL, DTK_STRING, DTK_TIME, DTK_TIME_M, DTK_TZ, DTK_WEEK, DTK_YEAR, fb(), HOUR, i, IGNORE_DTF, INTERVAL_FULL_RANGE, INTERVAL_MASK, IntervalStyle, INTSTYLE_POSTGRES_VERBOSE, INTSTYLE_SQL_STANDARD, MICROSECOND, MILLISECOND, MINUTE, MONTH, MONTHS_PER_YEAR, range(), RESERV, SECOND, SECS_PER_DAY, SECS_PER_HOUR, SECS_PER_MINUTE, strtoint(), 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, type, TZ, UNITS, USECS_PER_SEC, val, and YEAR.
Referenced by PGTYPESinterval_from_asc().
Definition at line 112 of file interval.c.
References AdjustFractDays(), AdjustFractSeconds(), ClearPgTm(), DAYS_PER_MONTH, DTERR_BAD_FORMAT, DTK_DELTA, fb(), ISO8601IntegerWidth(), MONTHS_PER_YEAR, ParseISO8601Number(), SECS_PER_DAY, SECS_PER_HOUR, SECS_PER_MINUTE, str, 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, and val.
Referenced by PGTYPESinterval_from_asc().
Definition at line 759 of file interval.c.
References AddISO8601IntPart(), AddPostgresIntPart(), AddVerboseIntPart(), AppendSeconds(), fb(), INTSTYLE_ISO_8601, INTSTYLE_POSTGRES, INTSTYLE_POSTGRES_VERBOSE, INTSTYLE_SQL_STANDARD, MAX_INTERVAL_PRECISION, sprintf, str, tm, pg_tm::tm_hour, pg_tm::tm_mday, pg_tm::tm_min, pg_tm::tm_mon, pg_tm::tm_sec, and pg_tm::tm_year.
Referenced by PGTYPESinterval_to_asc().
Definition at line 942 of file interval.c.
References fb(), MONTHS_PER_YEAR, 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, USECS_PER_HOUR, USECS_PER_MINUTE, and USECS_PER_SEC.
Referenced by PGTYPESinterval_to_asc().
Definition at line 81 of file interval.c.
References fb().
Referenced by DecodeISO8601Interval().
|
static |
Definition at line 56 of file interval.c.
References DTERR_BAD_FORMAT, DTERR_FIELD_OVERFLOW, fb(), str, and val.
Referenced by DecodeISO8601Interval().
Definition at line 1082 of file interval.c.
References fb().
Referenced by ecpg_get_data(), and main().
Definition at line 997 of file interval.c.
Referenced by main().
Definition at line 1003 of file interval.c.
References DecodeInterval(), DecodeISO8601Interval(), DTK_DELTA, fb(), free, MAXDATEFIELDS, MAXDATELEN, ParseDateTime(), pgtypes_alloc(), PGTYPES_INTVL_BAD_INTERVAL, str, tm, tm2interval(), pg_tm::tm_hour, pg_tm::tm_mday, pg_tm::tm_min, pg_tm::tm_mon, pg_tm::tm_sec, and pg_tm::tm_year.
Referenced by ecpg_get_data(), and main().
Definition at line 987 of file interval.c.
References pgtypes_alloc().
Referenced by main().
Definition at line 1062 of file interval.c.
References buf, EncodeInterval(), fb(), interval2tm(), IntervalStyle, INTSTYLE_POSTGRES_VERBOSE, MAXDATELEN, PGTYPES_INTVL_BAD_INTERVAL, pgtypes_strdup(), and tm.
Referenced by ecpg_store_input(), intoasc(), and main().
Definition at line 972 of file interval.c.
References fb(), INT64CONST, MONTHS_PER_YEAR, 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, and USECS_PER_SEC.
Referenced by PGTYPESinterval_from_asc().