ecpglib.h 1.1 KB
Newer Older
1
#include <postgres.h>
2

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

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

#ifdef LIBPQ_FE_H
21
	bool		ECPGsetdb(PGconn *);
22

23 24 25 26
#endif

/* Here are some methods used by the lib. */
/* Returns a pointer to a string containing a simple type name. */
27
	const char *ECPGtype_name(enum ECPGttype);
28 29

/* A generic varchar type. */
30 31 32 33 34
	struct ECPGgeneric_varchar
	{
		int			len;
		char		arr[1];
	};
35

36
/* print an error message */
37
	void		sqlprint(void);
38

39 40 41 42
	struct cursor
	{
		const char *name;
		char	   *command;
M
 
Marc G. Fournier 已提交
43
		struct cursor *next;
44
	};
M
 
Marc G. Fournier 已提交
45

46
	extern int	no_auto_trans;
M
 
Marc G. Fournier 已提交
47

48 49
/* define this for simplicity as well as compatibility */

50
#define		  SQLCODE	 sqlca.sqlcode
51 52 53

#ifdef __cplusplus
}
54

55
#endif
56 57

#include <ecpgerrno.h>