Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the values to substract.

REL8_0_STABLE
Michael Meskes 18 years ago
parent da2c447361
commit df52ecc314
  1. 4
      src/interfaces/ecpg/pgtypeslib/timestamp.c

@ -784,9 +784,9 @@ PGTYPEStimestamp_sub(timestamp *ts1, timestamp *ts2, interval *iv)
return PGTYPES_TS_ERR_EINFTIME;
else
#ifdef HAVE_INT64_TIMESTAMP
iv->time = (ts1 - ts2);
iv->time = (*ts1 - *ts2);
#else
iv->time = JROUND(ts1 - ts2);
iv->time = JROUND(*ts1 - *ts2);
#endif
iv->month = 0;

Loading…
Cancel
Save