aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2008-04-10 10:43:35 +0000
committerMichael Meskes <meskes@postgresql.org>2008-04-10 10:43:35 +0000
commit02b2bc7907718381b3c493318d08ddd21d5cedbf (patch)
tree51a2e5657f09cb779ea190af3109f95575062d54
parentd44523638a08a9c5aa049a836dda25e350e80b06 (diff)
downloadpostgresql-02b2bc7907718381b3c493318d08ddd21d5cedbf.tar.gz
postgresql-02b2bc7907718381b3c493318d08ddd21d5cedbf.zip
PGTYPEStimestamp_sub should use the values and not the pointers to substract.
-rw-r--r--src/interfaces/ecpg/ChangeLog5
-rw-r--r--src/interfaces/ecpg/pgtypeslib/timestamp.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index de2fdabc68d..a5eb10b351a 100644
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -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.
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;