]> granicus.if.org Git - postgresql/commitdiff
Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the values to substract.
authorMichael Meskes <meskes@postgresql.org>
Thu, 10 Apr 2008 10:46:34 +0000 (10:46 +0000)
committerMichael Meskes <meskes@postgresql.org>
Thu, 10 Apr 2008 10:46:34 +0000 (10:46 +0000)
src/interfaces/ecpg/pgtypeslib/timestamp.c

index f1af271e3ad514587ac11da76f83ff1e7e1e6cb3..681d90119386b2d7d7fbc16b6dc3c7b48588c906 100644 (file)
@@ -804,7 +804,7 @@ PGTYPEStimestamp_sub(timestamp * ts1, timestamp * ts2, interval * iv)
        if (TIMESTAMP_NOT_FINITE(*ts1) || TIMESTAMP_NOT_FINITE(*ts2))
                return PGTYPES_TS_ERR_EINFTIME;
        else
-               iv->time = (ts1 - ts2);
+               iv->time = (*ts1 - *ts2);
 
        iv->month = 0;