]> granicus.if.org Git - postgresql/commitdiff
PGTYPEStimestamp_sub should use the values and not the pointers to substract.
authorMichael Meskes <meskes@postgresql.org>
Thu, 10 Apr 2008 10:43:35 +0000 (10:43 +0000)
committerMichael Meskes <meskes@postgresql.org>
Thu, 10 Apr 2008 10:43:35 +0000 (10:43 +0000)
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/pgtypeslib/timestamp.c

index de2fdabc68d069303d719fd187efe6e8273ff6d3..a5eb10b351ac800e8734979990e63bc3bed96b04 100644 (file)
@@ -2341,6 +2341,11 @@ Wed, 26 Mar 2008 17:02:08 +0100
 
        - Moved from PQsetdbLogin to PQconnectDB.
        - Correctly parse connect options.
+
+Thu, 10 Apr 2008 12:42:25 +0200
+
+       - Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the
+         values to substract.
        - Set pgtypes library version to 3.1.
        - Set compat library version to 3.1.
        - Set ecpg library version to 6.2.
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;