PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
ecpg_informix.h
Go to the documentation of this file.
1 /*
2  * This file contains stuff needed to be as compatible to Informix as possible.
3  * src/interfaces/ecpg/include/ecpg_informix.h
4  */
5 #ifndef _ECPG_INFORMIX_H
6 #define _ECPG_INFORMIX_H
7 
8 #include <ecpglib.h>
9 #include <pgtypes_date.h>
10 #include <pgtypes_interval.h>
11 #include <pgtypes_numeric.h>
12 #include <pgtypes_timestamp.h>
13 
14 #define SQLNOTFOUND 100
15 
16 #define ECPG_INFORMIX_NUM_OVERFLOW -1200
17 #define ECPG_INFORMIX_NUM_UNDERFLOW -1201
18 #define ECPG_INFORMIX_DIVIDE_ZERO -1202
19 #define ECPG_INFORMIX_BAD_YEAR -1204
20 #define ECPG_INFORMIX_BAD_MONTH -1205
21 #define ECPG_INFORMIX_BAD_DAY -1206
22 #define ECPG_INFORMIX_ENOSHORTDATE -1209
23 #define ECPG_INFORMIX_DATE_CONVERT -1210
24 #define ECPG_INFORMIX_OUT_OF_MEMORY -1211
25 #define ECPG_INFORMIX_ENOTDMY -1212
26 #define ECPG_INFORMIX_BAD_NUMERIC -1213
27 #define ECPG_INFORMIX_BAD_EXPONENT -1216
28 #define ECPG_INFORMIX_BAD_DATE -1218
29 #define ECPG_INFORMIX_EXTRA_CHARS -1264
30 
31 #ifdef __cplusplus
32 extern "C"
33 {
34 #endif
35 
36 extern int rdatestr(date, char *);
37 extern void rtoday(date *);
38 extern int rjulmdy(date, short *);
39 extern int rdefmtdate(date *, char *, char *);
40 extern int rfmtdate(date, char *, char *);
41 extern int rmdyjul(short *, date *);
42 extern int rstrdate(char *, date *);
43 extern int rdayofweek(date);
44 
45 extern int rfmtlong(long, char *, char *);
46 extern int rgetmsg(int, char *, int);
47 extern int risnull(int, char *);
48 extern int rsetnull(int, char *);
49 extern int rtypalign(int, int);
50 extern int rtypmsize(int, int);
51 extern int rtypwidth(int, int);
52 extern void rupshift(char *);
53 
54 extern int byleng(char *, int);
55 extern void ldchar(char *, int, char *);
56 
57 extern void ECPG_informix_set_var(int, void *, int);
58 extern void *ECPG_informix_get_var(int);
59 extern void ECPG_informix_reset_sqlca(void);
60 
61 /* Informix defines these in decimal.h */
62 int decadd(decimal *, decimal *, decimal *);
63 int deccmp(decimal *, decimal *);
64 void deccopy(decimal *, decimal *);
65 int deccvasc(char *, int, decimal *);
66 int deccvdbl(double, decimal *);
67 int deccvint(int, decimal *);
68 int deccvlong(long, decimal *);
69 int decdiv(decimal *, decimal *, decimal *);
70 int decmul(decimal *, decimal *, decimal *);
71 int decsub(decimal *, decimal *, decimal *);
72 int dectoasc(decimal *, char *, int, int);
73 int dectodbl(decimal *, double *);
74 int dectoint(decimal *, int *);
75 int dectolong(decimal *, long *);
76 
77 /* Informix defines these in datetime.h */
78 extern void dtcurrent(timestamp *);
79 extern int dtcvasc(char *, timestamp *);
80 extern int dtsub(timestamp *, timestamp *, interval *);
81 extern int dttoasc(timestamp *, char *);
82 extern int dttofmtasc(timestamp *, char *, int, char *);
83 extern int intoasc(interval *, char *);
84 extern int dtcvfmtasc(char *, char *, timestamp *);
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* ndef _ECPG_INFORMIX_H */
void ECPG_informix_reset_sqlca(void)
Definition: informix.c:1032
void * ECPG_informix_get_var(int)
Definition: informix.c:1026
int decadd(decimal *, decimal *, decimal *)
Definition: informix.c:151
int64 timestamp
int dttofmtasc(timestamp *, char *, int, char *)
Definition: informix.c:661
int rdefmtdate(date *, char *, char *)
Definition: informix.c:548
int dtcvasc(char *, timestamp *)
Definition: informix.c:613
int deccvdbl(double, decimal *)
Definition: informix.c:246
long date
Definition: pgtypes_date.h:8
int decmul(decimal *, decimal *, decimal *)
Definition: informix.c:337
void deccopy(decimal *, decimal *)
Definition: informix.c:173
void rtoday(date *)
Definition: informix.c:529
int intoasc(interval *, char *)
Definition: informix.c:667
int rgetmsg(int, char *, int)
Definition: informix.c:987
int rtypwidth(int, int)
Definition: informix.c:1012
int byleng(char *, int)
Definition: informix.c:971
int deccvint(int, decimal *)
Definition: informix.c:268
int rtypalign(int, int)
Definition: informix.c:996
int risnull(int, char *)
Definition: informix.c:1050
int dectoint(decimal *, int *)
Definition: informix.c:453
int dtcvfmtasc(char *, char *, timestamp *)
Definition: informix.c:639
void ldchar(char *, int, char *)
Definition: informix.c:978
int rsetnull(int, char *)
Definition: informix.c:1043
void rupshift(char *)
Definition: informix.c:962
int dtsub(timestamp *, timestamp *, interval *)
Definition: informix.c:645
int rtypmsize(int, int)
Definition: informix.c:1004
int dectodbl(decimal *, double *)
Definition: informix.c:432
int decsub(decimal *, decimal *, decimal *)
Definition: informix.c:359
int rmdyjul(short *, date *)
void dtcurrent(timestamp *)
Definition: informix.c:607
int deccmp(decimal *, decimal *)
Definition: informix.c:167
int decdiv(decimal *, decimal *, decimal *)
Definition: informix.c:312
int rdayofweek(date)
Definition: informix.c:599
int rjulmdy(date, short *)
int rdatestr(date, char *)
Definition: informix.c:502
int deccvlong(long, decimal *)
Definition: informix.c:290
int rfmtdate(date, char *, char *)
Definition: informix.c:574
int rstrdate(char *, date *)
Definition: informix.c:523
void ECPG_informix_set_var(int, void *, int)
Definition: informix.c:1020
int deccvasc(char *, int, decimal *)
Definition: informix.c:198
int dectoasc(decimal *, char *, int, int)
Definition: informix.c:381
int dttoasc(timestamp *, char *)
Definition: informix.c:651
int dectolong(decimal *, long *)
Definition: informix.c:477
int rfmtlong(long, char *, char *)
Definition: informix.c:768