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

index c2a413770f5566015406ede42040761901f4af4d..bbbb501d81829ff4b5655ef94814bf39a1deae8d 100644 (file)
@@ -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;