aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2006-05-31 08:12:48 +0000
committerMichael Meskes <meskes@postgresql.org>2006-05-31 08:12:48 +0000
commit085e7c2fd8bb7a19603d670a1afc8db4d6acef08 (patch)
treee8c98b2e0349c595d488adf6b4c8f56d3d7555ed /src
parenta0ffab351e2dca12200e95c45f6edf5ddebe78b0 (diff)
downloadpostgresql-085e7c2fd8bb7a19603d670a1afc8db4d6acef08.tar.gz
postgresql-085e7c2fd8bb7a19603d670a1afc8db4d6acef08.zip
Somehow a ";" got lost which changed the logic. This btw is the first fix resulting from SoC.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/ChangeLog4
-rw-r--r--src/interfaces/ecpg/pgtypeslib/datetime.c12
2 files changed, 10 insertions, 6 deletions
diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index 60a77fa6bc7..44fab3b4540 100644
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -2001,6 +2001,10 @@ Fri, 17 Mar 2006 16:38:19 +0100
Mo Apr 24 11:40:05 CEST 2006
- Fixed memory leak bugs found by Martijn Oosterhout.
+
+Mi Mai 31 10:10:36 CEST 2006
+
+ - Fixed PGTYPESdate_from_timestamp because some characters got lost there
- Set ecpg library version to 5.2.
- Set ecpg version to 4.2.1.
diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c
index 2f933297c2f..76113d23f3f 100644
--- a/src/interfaces/ecpg/pgtypeslib/datetime.c
+++ b/src/interfaces/ecpg/pgtypeslib/datetime.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/datetime.c,v 1.27 2006/03/11 04:38:39 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/datetime.c,v 1.28 2006/05/31 08:12:48 meskes Exp $ */
#include "postgres_fe.h"
@@ -19,16 +19,16 @@ PGTYPESdate_from_timestamp(timestamp dt)
dDate = 0; /* suppress compiler warning */
- if (TIMESTAMP_NOT_FINITE(dt))
- return
-
+ if (!TIMESTAMP_NOT_FINITE(dt))
+ {
#ifdef HAVE_INT64_TIMESTAMP
/* Microseconds to days */
- dDate = (dt / USECS_PER_DAY);
+ dDate = (dt / USECS_PER_DAY);
#else
/* Seconds to days */
- dDate = (dt / (double) SECS_PER_DAY);
+ dDate = (dt / (double) SECS_PER_DAY);
#endif
+ }
return dDate;
}