summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/ChangeLog4
-rw-r--r--src/interfaces/ecpg/include/sqltypes.h2
-rw-r--r--src/interfaces/ecpg/pgtypeslib/timestamp.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index 78099437431..31e67351fff 100644
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -1608,6 +1608,10 @@ Mon Aug 25 13:24:27 CEST 2003
Tue Aug 26 18:06:45 CEST 2003
- Fixed processing of connect statement with username as variable.
+
+Mon Sep 1 14:33:10 CEST 2003
+
+ - Fixed two bugs in numeric library.
- Set ecpg version to 3.0.0
- Set ecpg library to 4.0.0
- Set pgtypes library to 1.0.0
diff --git a/src/interfaces/ecpg/include/sqltypes.h b/src/interfaces/ecpg/include/sqltypes.h
index 1ebde04714e..f8e00c16844 100644
--- a/src/interfaces/ecpg/include/sqltypes.h
+++ b/src/interfaces/ecpg/include/sqltypes.h
@@ -9,7 +9,7 @@
#define CSTRINGTYPE ECPGt_char
#define CDATETYPE ECPGt_date
#define CMONEYTYPE 111
-#define CDTIMETYPE 112
+#define CDTIMETYPE ECPGt_timestamp
#define CLOCATORTYPE 113
#define CVCHARTYPE ECPGt_varchar
#define CINVTYPE 115
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 8a96d696b40..9ad82ba4d2b 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -418,7 +418,7 @@ dttofmtasc_replace(Timestamp *ts, Date dDate, int dow, struct tm * tm,
/* XXX */
break;
case 'C':
- replace_val.uint_val = (tm->tm_year + 1900) / 100;
+ replace_val.uint_val = tm->tm_year / 100;
replace_type = PGTYPES_TYPE_UINT_2_LZ;
break;
case 'd':
@@ -677,7 +677,7 @@ dttofmtasc_replace(Timestamp *ts, Date dDate, int dow, struct tm * tm,
replace_type = PGTYPES_TYPE_UINT_2_LZ;
break;
case 'Y':
- replace_val.uint_val = tm->tm_year + 1900;
+ replace_val.uint_val = tm->tm_year;
replace_type = PGTYPES_TYPE_UINT;
break;
case 'z':