7 #define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
14 #line 1 "regression.h"
52 typedef char string[11];
123 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0); }
132 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"create table empl ( idnum integer , name char ( 20 ) , accs smallint , string1 char ( 10 ) , string2 char ( 10 ) , string3 char ( 10 ) )",
ECPGt_EOIT,
ECPGt_EORT);}
141 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into empl values ( 1 , 'user name' , $1 , 'first str' , 'second str' , 'third str' )",
142 ECPGt_short,&(accs_val),(
long)1,(
long)1,
sizeof(
short),
152 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"select idnum , name , accs , string1 , string2 , string3 from empl where idnum = $1 ",
163 ECPGt_char,&(ptr),(
long)0,(
long)1,(1)*
sizeof(
char),
174 printf (
"id=%ld name='%s' accs=%d str='%s' ptr='%s' vc='%10.10s'\n", empl.
idnum, empl.
name, empl.
accs,
str, ptr, vc.text);
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
Datum varchar(PG_FUNCTION_ARGS)