|
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 719 of file interval.c.
References fb(), sprintf, and value.
Referenced by EncodeInterval().
|
static |
Definition at line 696 of file interval.c.
References fb(), sprintf, and value.
Referenced by EncodeInterval().
|
static |
Definition at line 676 of file interval.c.
References fb(), sprintf, and value.
Referenced by EncodeInterval().
Definition at line 37 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 19 of file interval.c.
References fb(), scale, tm, and pg_tm::tm_sec.
Referenced by AdjustFractDays(), DecodeInterval(), and DecodeISO8601Interval().
Definition at line 729 of file interval.c.
References fb(), sprintf, and TrimTrailingZeros().
Referenced by EncodeInterval().
Definition at line 90 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 322 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, pg_fallthrough, 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 108 of file interval.c.
References AdjustFractDays(), AdjustFractSeconds(), ClearPgTm(), DAYS_PER_MONTH, DTERR_BAD_FORMAT, DTK_DELTA, fb(), ISO8601IntegerWidth(), MONTHS_PER_YEAR, ParseISO8601Number(), pg_fallthrough, 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 755 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 938 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 77 of file interval.c.
References fb().
Referenced by DecodeISO8601Interval().
|
static |
Definition at line 52 of file interval.c.
References DTERR_BAD_FORMAT, DTERR_FIELD_OVERFLOW, fb(), str, and val.
Referenced by DecodeISO8601Interval().
Definition at line 1078 of file interval.c.
References fb().
Referenced by ecpg_get_data(), and main().
Definition at line 993 of file interval.c.
Referenced by main().
Definition at line 999 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 983 of file interval.c.
References pgtypes_alloc().
Referenced by main().
Definition at line 1058 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 968 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().