ecpglib.h 1.2 KB
Newer Older
B
Bruce Momjian 已提交
1 2
#include "postgres.h"
#include "libpq-fe.h"
3

4
#ifdef __cplusplus
5 6
extern		"C"
{
7 8
#endif

9
	void		ECPGdebug(int, FILE *);
M
Michael Meskes 已提交
10
	bool		ECPGstatus(int, const char *);
M
Michael Meskes 已提交
11
	bool		ECPGsetcommit(int, const char *, const char *);
12
	bool		ECPGsetconn(int, const char *);
M
Michael Meskes 已提交
13
	bool		ECPGconnect(int, const char *, const char *, const char *, const char *, int);
M
 
Marc G. Fournier 已提交
14 15
	bool		ECPGdo(int, const char *, char *,...);
	bool		ECPGtrans(int, const char *, const char *);
16
	bool		ECPGdisconnect(int, const char *);
M
 
Marc G. Fournier 已提交
17 18
	bool		ECPGprepare(int, char *, char *);
	bool		ECPGdeallocate(int, char *);
M
Michael Meskes 已提交
19
	bool		ECPGdeallocate_all(int);
20 21
	char	   *ECPGprepared_statement(char *);

22
	void		ECPGlog(const char *format,...);
23

M
Michael Meskes 已提交
24 25
	/* print an error message */
	void		sqlprint(void);
26

27 28
/* define this for simplicity as well as compatibility */

29
#define		  SQLCODE	 sqlca.sqlcode
30

M
Michael Meskes 已提交
31 32
/* dynamic SQL */

33 34 35 36
	bool		ECPGdo_descriptor(int line, const char *connection,
							  const char *descriptor, const char *query);
	bool		ECPGdeallocate_desc(int line, const char *name);
	bool		ECPGallocate_desc(int line, const char *name);
37
	void		ECPGraise(int line, int code, const char *str);
M
Michael Meskes 已提交
38
	bool		ECPGget_desc_header(int, char *, int *);
39 40
	bool		ECPGget_desc(int, char *, int,...);

M
Michael Meskes 已提交
41

42 43
#ifdef __cplusplus
}
44

45
#endif