mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the values to substract.
This commit is contained in:
@ -787,9 +787,9 @@ PGTYPEStimestamp_sub(timestamp *ts1, timestamp *ts2, interval *iv)
|
|||||||
return PGTYPES_TS_ERR_EINFTIME;
|
return PGTYPES_TS_ERR_EINFTIME;
|
||||||
else
|
else
|
||||||
#ifdef HAVE_INT64_TIMESTAMP
|
#ifdef HAVE_INT64_TIMESTAMP
|
||||||
iv->time = (ts1 - ts2);
|
iv->time = (*ts1 - *ts2);
|
||||||
#else
|
#else
|
||||||
iv->time = JROUND(ts1 - ts2);
|
iv->time = JROUND(*ts1 - *ts2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
iv->month = 0;
|
iv->month = 0;
|
||||||
|
Reference in New Issue
Block a user