postgres.git / summary / log / commit / refs
commit 4fcff6299145424f66c3790913cce598ef3cc465
Author: Michael Meskes <meskes@postgresql.org>
Date: Thu Apr 10 10:46:22 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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 03aa5f07d08..c86f1a53b22 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -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;
[parent: 1c3722f28066]