]> 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:22 +0000 (10:46 +0000)
committerMichael Meskes <meskes@postgresql.org>
Thu, 10 Apr 2008 10:46:22 +0000 (10:46 +0000)
src/interfaces/ecpg/pgtypeslib/timestamp.c

index 03aa5f07d08795abdec6c95c44efecc384390afa..c86f1a53b2282f1e03baad0913eb3b00d15193bd 100644 (file)
@@ -867,7 +867,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;