postgres.git / summary / log / commit / refs

commit    df52ecc3145a2feb241801484512aff3f0effbc7
Author:   Michael Meskes <meskes@postgresql.org>
Date:     Thu Apr 10 10:46:44 2008 +0000
First released in: 7.4.20, 8.0.16, 8.1.12, 8.2.8, 8.3.2

    Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the values to substract.


src/interfaces/ecpg/pgtypeslib/timestamp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c index c2a413770f5..bbbb501d818 100644 --- a/src/interfaces/ecpg/pgtypeslib/timestamp.c +++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c @@ -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; [parent: da2c44736188]