mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Improve comments for AdjustIntervalForTypmod.
Blank line adjustments.
This commit is contained in:
@@ -1237,7 +1237,6 @@ dt2time(double jd, int *hour, int *min, int *sec, fsec_t *fsec)
|
||||
{
|
||||
#ifdef HAVE_INT64_TIMESTAMP
|
||||
int64 time;
|
||||
|
||||
#else
|
||||
double time;
|
||||
#endif
|
||||
|
@@ -416,7 +416,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm * tm, fse
|
||||
sec = (*fsec / USECS_PER_SEC);
|
||||
*fsec -= (sec * USECS_PER_SEC);
|
||||
#else
|
||||
TMODULO(*fsec, sec, 1e0);
|
||||
TMODULO(*fsec, sec, 1.0);
|
||||
#endif
|
||||
tm->tm_sec += sec;
|
||||
}
|
||||
@@ -674,7 +674,6 @@ interval2tm(interval span, struct tm * tm, fsec_t *fsec)
|
||||
{
|
||||
#ifdef HAVE_INT64_TIMESTAMP
|
||||
int64 time;
|
||||
|
||||
#else
|
||||
double time;
|
||||
#endif
|
||||
@@ -704,9 +703,9 @@ interval2tm(interval span, struct tm * tm, fsec_t *fsec)
|
||||
*fsec = (time - (tm->tm_sec * USECS_PER_SEC));
|
||||
#else
|
||||
TMODULO(time, tm->tm_mday, (double)SECS_PER_DAY);
|
||||
TMODULO(time, tm->tm_hour, 3600e0);
|
||||
TMODULO(time, tm->tm_min, 60e0);
|
||||
TMODULO(time, tm->tm_sec, 1e0);
|
||||
TMODULO(time, tm->tm_hour, 3600.0);
|
||||
TMODULO(time, tm->tm_min, 60.0);
|
||||
TMODULO(time, tm->tm_sec, 1.0);
|
||||
*fsec = time;
|
||||
#endif
|
||||
|
||||
|
@@ -103,7 +103,6 @@ dt2time(timestamp jd, int *hour, int *min, int *sec, fsec_t *fsec)
|
||||
{
|
||||
#ifdef HAVE_INT64_TIMESTAMP
|
||||
int64 time;
|
||||
|
||||
#else
|
||||
double time;
|
||||
#endif
|
||||
@@ -148,7 +147,6 @@ timestamp2tm(timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, char **tzn)
|
||||
int dDate,
|
||||
date0;
|
||||
int64 time;
|
||||
|
||||
#else
|
||||
double dDate,
|
||||
date0;
|
||||
@@ -280,7 +278,6 @@ PGTYPEStimestamp_from_asc(char *str, char **endptr)
|
||||
|
||||
#ifdef HAVE_INT64_TIMESTAMP
|
||||
int64 noresult = 0;
|
||||
|
||||
#else
|
||||
double noresult = 0.0;
|
||||
#endif
|
||||
@@ -572,7 +569,7 @@ dttofmtasc_replace(timestamp *ts, date dDate, int dow, struct tm * tm,
|
||||
break;
|
||||
case 's':
|
||||
#ifdef HAVE_INT64_TIMESTAMP
|
||||
replace_val.int64_val = (*ts - SetEpochTimestamp()) / 1000000e0;
|
||||
replace_val.int64_val = (*ts - SetEpochTimestamp()) / 1000000.0;
|
||||
replace_type = PGTYPES_TYPE_INT64;
|
||||
#else
|
||||
replace_val.double_val = *ts - SetEpochTimestamp();
|
||||
|
Reference in New Issue
Block a user