Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit999f129

Browse files
author
Michael Meskes
committed
Moved Informix stuff to its own compat library. Interval datetype is now fully functional.
1 parent82a91eb commit999f129

File tree

14 files changed

+807
-346
lines changed

14 files changed

+807
-346
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,17 @@ Thu Mar 27 15:23:58 CET 2003
13761376
- Some more updates to pgtypeslib.
13771377
- Set optimization to -O1 until I find the reason why code is broken
13781378
with -O2.
1379+
1380+
Sat Mar 29 22:03:16 CET 2003
1381+
1382+
- Moved Informix compatibility stuff its own library.
1383+
- Added interval datetypes.
1384+
1385+
Sun Mar 30 13:43:13 CEST 2003
1386+
1387+
- Interval datetype now fully functional.
13791388
- Set ecpg version to 2.12.0.
13801389
- Set ecpg library to 3.4.2.
13811390
- Set pgtypes library to 1.0.0
1391+
- Set compat library to 1.0.0
13821392

‎src/interfaces/ecpg/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ all install installdirs uninstall dep depend distprep:
66
$(MAKE) -C include$@
77
$(MAKE) -C ecpglib$@
88
$(MAKE) -C pgtypeslib$@
9+
$(MAKE) -C compatlib$@
910
$(MAKE) -C preproc$@
1011

1112
cleandistcleanmaintainer-clean:
1213
-$(MAKE) -C include$@
1314
-$(MAKE) -C ecpglib$@
1415
-$(MAKE) -C pgtypeslib$@
16+
-$(MAKE) -C compatlib$@
1517
-$(MAKE) -C preproc$@
1618
-$(MAKE) -Ctest clean

‎src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.6 2003/03/27 14:29:17 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.7 2003/03/30 11:48:18 meskes Exp $ */
22

33
/*
44
* The aim is to get a simpler inteface to the database routines.
@@ -847,7 +847,7 @@ ECPGstore_input(const struct statement * stmt, const struct variable * var,
847847
{
848848
for (element=0;element<var->arrsize;element++)
849849
{
850-
str=PGTYPESnumeric_ntoa((Numeric*)((var+var->offset*element)->value));
850+
str=PGTYPESnumeric_ntoa((Numeric*)((var+var->offset*element)->value),0);
851851
slen=strlen (str);
852852

853853
if (!(mallocedval=ECPGrealloc(mallocedval,strlen(mallocedval)+slen+5,stmt->lineno)))
@@ -863,7 +863,7 @@ ECPGstore_input(const struct statement * stmt, const struct variable * var,
863863
}
864864
else
865865
{
866-
str=PGTYPESnumeric_ntoa((Numeric*)(var->value));
866+
str=PGTYPESnumeric_ntoa((Numeric*)(var->value),0);
867867
slen=strlen (str);
868868

869869
if (!(mallocedval=ECPGalloc(slen+1,stmt->lineno)))
@@ -1239,7 +1239,9 @@ ECPGexecute(struct statement * stmt)
12391239
{
12401240
ECPGlog("ECPGexecute line %d: ASYNC NOTIFY of '%s' from backend pid '%d' received\n",
12411241
stmt->lineno,notify->relname,notify->be_pid);
1242-
PQfreemem(notify);
1242+
/*PQfreemem(notify);*/
1243+
free(notify);
1244+
#warning Remove PQfreemem define
12431245
}
12441246

12451247
returnstatus;

‎src/interfaces/ecpg/include/ecpg_informix.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
* This file contains stuff needed to be as compatible to Informix as possible.
33
*/
44

5+
#include<decimal.h>
6+
#include<datetime.h>
7+
58
#defineSQLNOTFOUND 100
69

710
#ifndefDate
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
#ifndefPGTYPES_DATETIME
22
#definePGTYPES_DATETIME
33

4+
#include<pgtypes_timestamp.h>
5+
46
#defineDate long
57

68
externDatePGTYPESdate_atod(char*,char**);
79
externchar*PGTYPESdate_dtoa(Date);
8-
externintPGTYPESdate_julmdy(Date,int*);
9-
externintPGTYPESdate_mdyjul(int*,Date*);
10-
externintPGTYPESdate_day(Date);
11-
10+
externDatePGTYPESdate_ttod(Timestamp);
11+
externvoidPGTYPESdate_julmdy(Date,int*);
12+
externvoidPGTYPESdate_mdyjul(int*,Date*);
13+
externintPGTYPESdate_dayofweek(Date);
14+
externvoidPGTYPESdate_today (Date*);
15+
externintPGTYPESdate_defmtdate(Date*,char*,char*);
16+
externintPGTYPESdate_fmtdate(Date,char*,char*);
1217
#endif/* PGTYPES_DATETIME */
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
#definePGTYPES_OVERFLOW201
2-
#definePGTYPES_BAD_NUMERIC202
3-
#definePGTYPES_DIVIDE_ZERO203
1+
#definePGTYPES_NUM_OVERFLOW201
2+
#definePGTYPES_NUM_BAD_NUMERIC202
3+
#definePGTYPES_NUM_DIVIDE_ZERO203
44

5-
#definePGTYPES_BAD_DATE210
5+
#definePGTYPES_DATE_BAD_DATE210
6+
#definePGTYPES_DATE_ERR_EARGS211
7+
#definePGTYPES_DATE_ERR_ENOSHORTDATE212
8+
#definePGTYPES_DATE_ERR_ENOTDMY213
9+
#definePGTYPES_DATE_BAD_DAY214
10+
#definePGTYPES_DATE_BAD_MONTH215
611

7-
#definePGTYPES_BAD_TIMESTAMP220
12+
#definePGTYPES_TS_BAD_TIMESTAMP220
13+
14+
#definePGTYPES_INTVL_BAD_INTERVAL230
815

‎src/interfaces/ecpg/include/pgtypes_numeric.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ typedef struct
2323
Numeric*PGTYPESnew(void);
2424
voidPGTYPESnumeric_free(Numeric*);
2525
Numeric*PGTYPESnumeric_aton(char*,char**);
26-
char*PGTYPESnumeric_ntoa(Numeric*);
26+
char*PGTYPESnumeric_ntoa(Numeric*,int);
2727
intPGTYPESnumeric_add(Numeric*,Numeric*,Numeric*);
2828
intPGTYPESnumeric_sub(Numeric*,Numeric*,Numeric*);
2929
intPGTYPESnumeric_mul(Numeric*,Numeric*,Numeric*);

‎src/interfaces/ecpg/pgtypeslib/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.3 2003/03/27 14:29:17 meskes Exp $
7+
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.4 2003/03/30 11:48:18 meskes Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -18,7 +18,7 @@ SO_MINOR_VERSION= 0.0
1818

1919
overrideCPPFLAGS := -O1 -g -I$(top_srcdir)/src/interfaces/ecpg/include -I$(top_srcdir)/src/include/utils$(CPPFLAGS)
2020

21-
OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o
21+
OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o interval.o
2222

2323
all: all-lib
2424

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp