mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Hide Informix datatypes. They are not seen by our built process anymore.
This commit is contained in:
parent
17f682488b
commit
1bd5e054ed
@ -1661,6 +1661,10 @@ Fri Sep 26 17:14:07 CEST 2003
|
||||
|
||||
- Incorrect datatype with precision argument should not create a
|
||||
segfault.
|
||||
|
||||
Fri Oct 3 12:04:57 CEST 2003
|
||||
|
||||
- Hide Informix datatypes in PostgreSQL built process.
|
||||
- Set ecpg version to 3.0.0
|
||||
- Set ecpg library to 4.0.0
|
||||
- Set pgtypes library to 1.0.0
|
||||
|
@ -5,9 +5,10 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpg_informix.h>
|
||||
#include <compatlib.h>
|
||||
#include <pgtypes_error.h>
|
||||
#include <pgtypes_date.h>
|
||||
#include <pgtypes_numeric.h>
|
||||
#include <sqltypes.h>
|
||||
|
||||
char *ECPGalloc(long, int);
|
||||
@ -886,7 +887,7 @@ rtypwidth(int sqltype, int sqllen)
|
||||
}
|
||||
|
||||
int
|
||||
dtcvfmtasc(char *inbuf, char *fmtstr, dtime_t * dtvalue)
|
||||
dtcvfmtasc(char *inbuf, char *fmtstr, timestamp * dtvalue)
|
||||
{
|
||||
return PGTYPEStimestamp_defmt_asc(inbuf, fmtstr, dtvalue);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ include $(top_builddir)/src/Makefile.global
|
||||
install: all installdirs install-headers
|
||||
|
||||
.PHONY: install-headers
|
||||
ecpg_headers = ecpgerrno.h ecpglib.h ecpgtype.h sqlca.h sql3types.h ecpg_informix.h pgtypes_error.h pgtypes_numeric.h pgtypes_timestamp.h pgtypes_date.h datetime.h decimal.h pgtypes_interval.h sqltypes.h
|
||||
ecpg_headers = ecpgerrno.h ecpglib.h ecpgtype.h sqlca.h sql3types.h ecpg_informix.h pgtypes_error.h pgtypes_numeric.h pgtypes_timestamp.h pgtypes_date.h datetime.h decimal.h pgtypes_interval.h sqltypes.h compatlib.h
|
||||
|
||||
install-headers: $(ecpg_headers)
|
||||
for i in $^; do $(INSTALL_DATA) $$i $(DESTDIR)$(includedir); done
|
||||
|
82
src/interfaces/ecpg/include/compatlib.h
Normal file
82
src/interfaces/ecpg/include/compatlib.h
Normal file
@ -0,0 +1,82 @@
|
||||
#ifndef _COMPATLIB_H
|
||||
#define _COMPATLIB_H
|
||||
/*
|
||||
* This file contains stuff needed to be as compatible to other DBMS as possible.
|
||||
*/
|
||||
|
||||
#include <ecpglib.h>
|
||||
#include <pgtypes_date.h>
|
||||
#include <pgtypes_interval.h>
|
||||
#include <pgtypes_numeric.h>
|
||||
#include <pgtypes_timestamp.h>
|
||||
|
||||
/* The following stuff is for Informix compatibility */
|
||||
|
||||
#define SQLNOTFOUND 100
|
||||
|
||||
#define ECPG_INFORMIX_NUM_OVERFLOW -1200
|
||||
#define ECPG_INFORMIX_NUM_UNDERFLOW -1201
|
||||
#define ECPG_INFORMIX_DIVIDE_ZERO -1202
|
||||
#define ECPG_INFORMIX_BAD_YEAR -1204
|
||||
#define ECPG_INFORMIX_BAD_MONTH -1205
|
||||
#define ECPG_INFORMIX_BAD_DAY -1206
|
||||
#define ECPG_INFORMIX_ENOSHORTDATE -1209
|
||||
#define ECPG_INFORMIX_DATE_CONVERT -1210
|
||||
#define ECPG_INFORMIX_OUT_OF_MEMORY -1211
|
||||
#define ECPG_INFORMIX_ENOTDMY -1212
|
||||
#define ECPG_INFORMIX_BAD_NUMERIC -1213
|
||||
#define ECPG_INFORMIX_BAD_EXPONENT -1216
|
||||
#define ECPG_INFORMIX_BAD_DATE -1218
|
||||
#define ECPG_INFORMIX_EXTRA_CHARS -1264
|
||||
|
||||
extern int rdatestr(date, char *);
|
||||
extern void rtoday(date *);
|
||||
extern int rjulmdy(date, short *);
|
||||
extern int rdefmtdate(date *, char *, char *);
|
||||
extern int rfmtdate(date, char *, char *);
|
||||
extern int rmdyjul(short *, date *);
|
||||
extern int rstrdate(char *, date *);
|
||||
extern int rdayofweek(date);
|
||||
|
||||
extern int rfmtlong(long, char *, char *);
|
||||
extern int rgetmsg(int, char *, int);
|
||||
extern int risnull(int, char *);
|
||||
extern int rsetnull(int, char *);
|
||||
extern int rtypalign(int, int);
|
||||
extern int rtypmsize(int, int);
|
||||
extern int rtypwidth(int, int);
|
||||
extern void rupshift(char *);
|
||||
|
||||
extern int byleng(char *, int);
|
||||
extern void ldchar(char *, int, char *);
|
||||
|
||||
extern void ECPG_informix_set_var(int, void *, int);
|
||||
extern void *ECPG_informix_get_var(int);
|
||||
|
||||
/* Informix defines these in decimal.h */
|
||||
int decadd(decimal *, decimal *, decimal *);
|
||||
int deccmp(decimal *, decimal *);
|
||||
void deccopy(decimal *, decimal *);
|
||||
int deccvasc(char *, int, decimal *);
|
||||
int deccvdbl(double, decimal *);
|
||||
int deccvint(int, decimal *);
|
||||
int deccvlong(long, decimal *);
|
||||
int decdiv(decimal *, decimal *, decimal *);
|
||||
int decmul(decimal *, decimal *, decimal *);
|
||||
int decsub(decimal *, decimal *, decimal *);
|
||||
int dectoasc(decimal *, char *, int, int);
|
||||
int dectodbl(decimal *, double *);
|
||||
int dectoint(decimal *, int *);
|
||||
int dectolong(decimal *, long *);
|
||||
|
||||
/* Informix defines these in datetime.h */
|
||||
|
||||
extern void dtcurrent(timestamp *);
|
||||
extern int dtcvasc(char *, timestamp *);
|
||||
extern int dtsub(timestamp *, timestamp *, interval *);
|
||||
extern int dttoasc(timestamp *, char *);
|
||||
extern int dttofmtasc(timestamp *, char *, int, char *);
|
||||
extern int intoasc(interval *, char *);
|
||||
extern int dtcvfmtasc(char *, char *, timestamp *);
|
||||
|
||||
#endif /* ndef _COMPATLIB_H */
|
@ -1,18 +1,9 @@
|
||||
#ifndef _ECPG_DATETIME_H
|
||||
#define _ECPG_DATETIME_H
|
||||
|
||||
#include <pgtypes_timestamp.h>
|
||||
#include <pgtypes_interval.h>
|
||||
#include <compatlib.h>
|
||||
|
||||
typedef timestamp dtime_t;
|
||||
typedef interval intrvl_t;
|
||||
|
||||
extern void dtcurrent(dtime_t *);
|
||||
extern int dtcvasc(char *, dtime_t *);
|
||||
extern int dtsub(dtime_t *, dtime_t *, intrvl_t *);
|
||||
extern int dttoasc(dtime_t *, char *);
|
||||
extern int dttofmtasc(dtime_t *, char *, int, char *);
|
||||
extern int intoasc(intrvl_t *, char *);
|
||||
extern int dtcvfmtasc(char *, char *, dtime_t *);
|
||||
|
||||
#endif /* ndef _ECPG_DATETIME_H */
|
||||
|
@ -1,23 +1,8 @@
|
||||
#ifndef _ECPG_DECIMAL_H
|
||||
#define _ECPG_DECIMAL_H
|
||||
|
||||
#include <pgtypes_numeric.h>
|
||||
#include <compatlib.h>
|
||||
|
||||
typedef decimal dec_t;
|
||||
|
||||
int decadd(dec_t *, dec_t *, dec_t *);
|
||||
int deccmp(dec_t *, dec_t *);
|
||||
void deccopy(dec_t *, dec_t *);
|
||||
int deccvasc(char *, int, dec_t *);
|
||||
int deccvdbl(double, dec_t *);
|
||||
int deccvint(int, dec_t *);
|
||||
int deccvlong(long, dec_t *);
|
||||
int decdiv(dec_t *, dec_t *, dec_t *);
|
||||
int decmul(dec_t *, dec_t *, dec_t *);
|
||||
int decsub(dec_t *, dec_t *, dec_t *);
|
||||
int dectoasc(dec_t *, char *, int, int);
|
||||
int dectodbl(dec_t *, double *);
|
||||
int dectoint(dec_t *, int *);
|
||||
int dectolong(dec_t *, long *);
|
||||
|
||||
#endif /* ndef _ECPG_DECIMAL_H */
|
||||
|
@ -6,48 +6,6 @@
|
||||
|
||||
#include <decimal.h>
|
||||
#include <datetime.h>
|
||||
#include <ecpglib.h>
|
||||
#include <pgtypes_date.h>
|
||||
|
||||
#define SQLNOTFOUND 100
|
||||
|
||||
#define ECPG_INFORMIX_NUM_OVERFLOW -1200
|
||||
#define ECPG_INFORMIX_NUM_UNDERFLOW -1201
|
||||
#define ECPG_INFORMIX_DIVIDE_ZERO -1202
|
||||
#define ECPG_INFORMIX_BAD_YEAR -1204
|
||||
#define ECPG_INFORMIX_BAD_MONTH -1205
|
||||
#define ECPG_INFORMIX_BAD_DAY -1206
|
||||
#define ECPG_INFORMIX_ENOSHORTDATE -1209
|
||||
#define ECPG_INFORMIX_DATE_CONVERT -1210
|
||||
#define ECPG_INFORMIX_OUT_OF_MEMORY -1211
|
||||
#define ECPG_INFORMIX_ENOTDMY -1212
|
||||
#define ECPG_INFORMIX_BAD_NUMERIC -1213
|
||||
#define ECPG_INFORMIX_BAD_EXPONENT -1216
|
||||
#define ECPG_INFORMIX_BAD_DATE -1218
|
||||
#define ECPG_INFORMIX_EXTRA_CHARS -1264
|
||||
|
||||
extern int rdatestr(date, char *);
|
||||
extern void rtoday(date *);
|
||||
extern int rjulmdy(date, short *);
|
||||
extern int rdefmtdate(date *, char *, char *);
|
||||
extern int rfmtdate(date, char *, char *);
|
||||
extern int rmdyjul(short *, date *);
|
||||
extern int rstrdate(char *, date *);
|
||||
extern int rdayofweek(date);
|
||||
|
||||
extern int rfmtlong(long, char *, char *);
|
||||
extern int rgetmsg(int, char *, int);
|
||||
extern int risnull(int, char *);
|
||||
extern int rsetnull(int, char *);
|
||||
extern int rtypalign(int, int);
|
||||
extern int rtypmsize(int, int);
|
||||
extern int rtypwidth(int, int);
|
||||
extern void rupshift(char *);
|
||||
|
||||
extern int byleng(char *, int);
|
||||
extern void ldchar(char *, int, char *);
|
||||
|
||||
extern void ECPG_informix_set_var(int, void *, int);
|
||||
extern void *ECPG_informix_get_var(int);
|
||||
#include <compatlib.h>
|
||||
|
||||
#endif /* ndef _ECPG_INFORMIX_H */
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "dt.h"
|
||||
#include "pgtypes_error.h"
|
||||
#include "pgtypes_interval.h"
|
||||
#include "datetime.h"
|
||||
|
||||
/* TrimTrailingZeros()
|
||||
* ... resulting from printing numbers with full precision.
|
||||
|
Loading…
Reference in New Issue
Block a user