Skip to content

Commit 02b2bc7

Browse files
author
Michael Meskes
committed
PGTYPEStimestamp_sub should use the values and not the pointers to substract.
1 parent d445236 commit 02b2bc7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,6 +2341,11 @@ Wed, 26 Mar 2008 17:02:08 +0100
23412341

23422342
- Moved from PQsetdbLogin to PQconnectDB.
23432343
- Correctly parse connect options.
2344+
2345+
Thu, 10 Apr 2008 12:42:25 +0200
2346+
2347+
- Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the
2348+
values to substract.
23442349
- Set pgtypes library version to 3.1.
23452350
- Set compat library version to 3.1.
23462351
- Set ecpg library version to 6.2.

src/interfaces/ecpg/pgtypeslib/timestamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ PGTYPEStimestamp_sub(timestamp * ts1, timestamp * ts2, interval * iv)
867867
if (TIMESTAMP_NOT_FINITE(*ts1) || TIMESTAMP_NOT_FINITE(*ts2))
868868
return PGTYPES_TS_ERR_EINFTIME;
869869
else
870-
iv->time = (ts1 - ts2);
870+
iv->time = (*ts1 - *ts2);
871871

872872
iv->month = 0;
873873

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy