From: Michael Meskes Date: Thu, 10 Apr 2008 10:46:56 +0000 (+0000) Subject: Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the values to substract. X-Git-Tag: REL7_4_20~13 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=a27b961a0cba1e263489450a826f8bbe22a11cf2;p=users%2Fc2main%2Fpostgres.git Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the values to substract. --- diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c index 19146d03e1..0c101f27ff 100644 --- a/src/interfaces/ecpg/pgtypeslib/timestamp.c +++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c @@ -787,9 +787,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;