1
/* Processed by ecpg (regression mode) */
2
/* These include files are added by the preprocessor */
6
/* End of automatic include section */
7
#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
11
* this file tests all sorts of connecting to one single database.
19
/* do not include regression.h */
24
/* exec sql begin declare section */
36
char * user = "connectuser" ;
37
/* exec sql end declare section */
43
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
46
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "alter user connectuser encrypted password 'connectpw'", ECPGt_EOIT, ECPGt_EORT);}
49
{ ECPGdisconnect(__LINE__, "CURRENT");}
51
/* <-- "main" not specified */
53
strcpy(db, "connectdb");
55
{ ECPGconnect(__LINE__, 0, db , NULL, NULL , id, 0); }
58
{ ECPGdisconnect(__LINE__, id);}
62
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
65
{ ECPGdisconnect(__LINE__, "main");}
69
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
72
{ ECPGdisconnect(__LINE__, "main");}
76
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
79
{ ECPGdisconnect(__LINE__, "main");}
83
{ ECPGconnect(__LINE__, 0, "" , "connectdb" , NULL , "main", 0); }
86
{ ECPGdisconnect(__LINE__, "main");}
90
{ ECPGconnect(__LINE__, 0, "connectdb" , "connectuser" , "connectdb" , "main", 0); }
93
{ ECPGdisconnect(__LINE__, "main");}
97
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/connectdb" , "connectuser" , NULL , "main", 0); }
100
{ ECPGdisconnect(__LINE__, "main");}
104
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/connectdb" , "connectuser" , NULL , "main", 0); }
107
{ ECPGdisconnect(__LINE__, "main");}
111
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/connectdb" , user , NULL , "main", 0); }
114
{ ECPGdisconnect(__LINE__, "main");}
118
{ ECPGconnect(__LINE__, 0, "unix:postgresql://200.46.204.71/connectdb" , "connectuser" , NULL , "main", 0); }
121
{ ECPGdisconnect(__LINE__, "main");}
125
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/" , "connectdb" , NULL , "main", 0); }
128
{ ECPGdisconnect(__LINE__, "main");}
133
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
136
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
139
{ ECPGdisconnect(__LINE__, "main");}
144
{ ECPGdisconnect(__LINE__, "nonexistant");}