Missed two places to replace union member.

This commit is contained in:
Michael Meskes 2003-08-01 18:19:03 +00:00
parent 6520c666c1
commit 25b10fc1e6
2 changed files with 3 additions and 3 deletions

View File

@ -80,10 +80,10 @@ pgtypes_fmt_replace(union un_fmt_comb replace_val, int replace_type, char** outp
i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
"%0.0g", replace_val.double_val);
break;
#ifdef HAVE_INT6
#ifdef HAVE_INT64
case PGTYPES_TYPE_INT64:
i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS,
INT64_FORMAT, replace_val.replace_int64);
INT64_FORMAT, replace_val.int64_val);
break;
#endif
case PGTYPES_TYPE_UINT:

View File

@ -546,7 +546,7 @@ dttofmtasc_replace (Timestamp *ts, Date dDate, int dow, struct tm* tm,
break;
case 's':
#ifdef HAVE_INT64_TIMESTAMP
replace_val.replace_int64 = ((*ts - SetEpochTimestamp()) / 1000000e0);
replace_val.int64_val = ((*ts - SetEpochTimestamp()) / 1000000e0);
replace_type = PGTYPES_TYPE_INT64;
#else
replace_val.double_val = *ts - SetEpochTimestamp();