Skip to content

Commit 05f4b03

Browse files
author
Michael Meskes
committed
Fixed two bugs in pgtypes library.
1 parent 11c2f19 commit 05f4b03

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,10 @@ Mon Aug 25 13:24:27 CEST 2003
16081608
Tue Aug 26 18:06:45 CEST 2003
16091609

16101610
- Fixed processing of connect statement with username as variable.
1611+
1612+
Mon Sep 1 14:33:10 CEST 2003
1613+
1614+
- Fixed two bugs in numeric library.
16111615
- Set ecpg version to 3.0.0
16121616
- Set ecpg library to 4.0.0
16131617
- Set pgtypes library to 1.0.0

src/interfaces/ecpg/include/sqltypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define CSTRINGTYPE ECPGt_char
1010
#define CDATETYPE ECPGt_date
1111
#define CMONEYTYPE 111
12-
#define CDTIMETYPE 112
12+
#define CDTIMETYPE ECPGt_timestamp
1313
#define CLOCATORTYPE 113
1414
#define CVCHARTYPE ECPGt_varchar
1515
#define CINVTYPE 115

src/interfaces/ecpg/pgtypeslib/timestamp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ dttofmtasc_replace(Timestamp *ts, Date dDate, int dow, struct tm * tm,
418418
/* XXX */
419419
break;
420420
case 'C':
421-
replace_val.uint_val = (tm->tm_year + 1900) / 100;
421+
replace_val.uint_val = tm->tm_year / 100;
422422
replace_type = PGTYPES_TYPE_UINT_2_LZ;
423423
break;
424424
case 'd':
@@ -677,7 +677,7 @@ dttofmtasc_replace(Timestamp *ts, Date dDate, int dow, struct tm * tm,
677677
replace_type = PGTYPES_TYPE_UINT_2_LZ;
678678
break;
679679
case 'Y':
680-
replace_val.uint_val = tm->tm_year + 1900;
680+
replace_val.uint_val = tm->tm_year;
681681
replace_type = PGTYPES_TYPE_UINT;
682682
break;
683683
case 'z':

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