Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 085e7c2

Browse files
author
Michael Meskes
committed
Somehow a ";" got lost which changed the logic. This btw is the first fix resulting from SoC.
1 parent a0ffab3 commit 085e7c2

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,6 +2001,10 @@ Fri, 17 Mar 2006 16:38:19 +0100
20012001
Mo Apr 24 11:40:05 CEST 2006
20022002

20032003
- Fixed memory leak bugs found by Martijn Oosterhout.
2004+
2005+
Mi Mai 31 10:10:36 CEST 2006
2006+
2007+
- Fixed PGTYPESdate_from_timestamp because some characters got lost there
20042008
- Set ecpg library version to 5.2.
20052009
- Set ecpg version to 4.2.1.
20062010

src/interfaces/ecpg/pgtypeslib/datetime.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/datetime.c,v 1.27 2006/03/11 04:38:39 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/datetime.c,v 1.28 2006/05/31 08:12:48 meskes Exp $ */
22

33
#include "postgres_fe.h"
44

@@ -19,16 +19,16 @@ PGTYPESdate_from_timestamp(timestamp dt)
1919

2020
dDate = 0; /* suppress compiler warning */
2121

22-
if (TIMESTAMP_NOT_FINITE(dt))
23-
return
24-
22+
if (!TIMESTAMP_NOT_FINITE(dt))
23+
{
2524
#ifdef HAVE_INT64_TIMESTAMP
2625
/* Microseconds to days */
27-
dDate = (dt / USECS_PER_DAY);
26+
dDate = (dt / USECS_PER_DAY);
2827
#else
2928
/* Seconds to days */
30-
dDate = (dt / (double) SECS_PER_DAY);
29+
dDate = (dt / (double) SECS_PER_DAY);
3130
#endif
31+
}
3232

3333
return dDate;
3434
}

0 commit comments

Comments
 (0)