@@ -27,118 +27,101 @@ main(void)
2727/* exec sql begin declare section */
2828
2929
30-
3130
3231#line 16 "test1.pgc"
3332 char db [ 200 ] ;
3433
3534#line 17 "test1.pgc"
36- char id [ 200 ] ;
37-
38- #line 18 "test1.pgc"
3935 char pw [ 200 ] ;
4036/* exec sql end declare section */
41- #line 19 "test1.pgc"
37+ #line 18 "test1.pgc"
4238
4339
4440 ECPGdebug (1 , stderr );
4541
4642 { ECPGconnect (__LINE__ , 0 , "connectdb" , NULL ,NULL , "main" , 0 ); }
47- #line 23 "test1.pgc"
43+ #line 22 "test1.pgc"
4844
4945 { ECPGdo (__LINE__ , 0 , 1 , NULL , "alter user connectuser encrypted password 'connectpw'" , ECPGt_EOIT , ECPGt_EORT );}
50- #line 24 "test1.pgc"
46+ #line 23 "test1.pgc"
5147
5248 { ECPGdisconnect (__LINE__ , "CURRENT" );}
53- #line 25 "test1.pgc"
49+ #line 24 "test1.pgc"
5450 /* <-- "main" not specified */
5551
56- strcpy (db , "connectdb" );
57- strcpy (id , "main" );
58- { ECPGconnect (__LINE__ , 0 , db , NULL ,NULL , id , 0 ); }
59- #line 29 "test1.pgc"
60-
61- { ECPGdisconnect (__LINE__ , id );}
62- #line 30 "test1.pgc"
63-
64-
6552 { ECPGconnect (__LINE__ , 0 , "connectdb@localhost" , NULL ,NULL , "main" , 0 ); }
66- #line 32 "test1.pgc"
53+ #line 26 "test1.pgc"
6754
6855 { ECPGdisconnect (__LINE__ , "main" );}
69- #line 33 "test1.pgc"
56+ #line 27 "test1.pgc"
7057
7158
72- { ECPGconnect (__LINE__ , 0 , "connectdb@localhost" , NULL ,NULL , "main" , 0 ); }
73- #line 35 "test1.pgc"
59+ { ECPGconnect (__LINE__ , 0 , "connectdb@localhost:55432 " , NULL ,NULL , "main" , 0 ); }
60+ #line 29 "test1.pgc"
7461
7562 { ECPGdisconnect (__LINE__ , "main" );}
76- #line 36 "test1.pgc"
63+ #line 30 "test1.pgc"
7764
7865
79- { ECPGconnect (__LINE__ , 0 , "connectdb@localhost " , "connectuser" , "connectdb" , "main" , 0 ); }
80- #line 38 "test1.pgc"
66+ { ECPGconnect (__LINE__ , 0 , "connectdb:55432 " , NULL , NULL , "main" , 0 ); }
67+ #line 32 "test1.pgc"
8168
8269 { ECPGdisconnect (__LINE__ , "main" );}
83- #line 39 "test1.pgc"
70+ #line 33 "test1.pgc"
8471
8572
8673 { ECPGconnect (__LINE__ , 0 , "tcp:postgresql://localhost:55432/connectdb" , "connectuser" , "connectpw" , NULL , 0 ); }
87- #line 41 "test1.pgc"
74+ #line 35 "test1.pgc"
8875
8976 { ECPGdisconnect (__LINE__ , "nonexistant" );}
90- #line 42 "test1.pgc"
77+ #line 36 "test1.pgc"
9178
9279 { ECPGdisconnect (__LINE__ , "CURRENT" );}
93- #line 43 "test1.pgc"
80+ #line 37 "test1.pgc"
9481
9582
9683 strcpy (pw , "connectpw" );
9784 strcpy (db , "tcp:postgresql://localhost:55432/connectdb" );
9885 { ECPGconnect (__LINE__ , 0 , db , "connectuser" , pw , NULL , 0 ); }
99- #line 47 "test1.pgc"
86+ #line 41 "test1.pgc"
10087
10188 { ECPGdisconnect (__LINE__ , "CURRENT" );}
102- #line 48 "test1.pgc"
89+ #line 42 "test1.pgc"
10390
10491
10592 { ECPGconnect (__LINE__ , 0 , "unix:postgresql://localhost:55432/connectdb" , "connectuser" , "connectpw" , NULL , 0 ); }
106- #line 50 "test1.pgc"
93+ #line 44 "test1.pgc"
10794
10895 { ECPGdisconnect (__LINE__ , "CURRENT" );}
109- #line 51 "test1.pgc"
96+ #line 45 "test1.pgc"
97+
98+
99+ { ECPGconnect (__LINE__ , 0 , "unix:postgresql://localhost:55432/connectdb" , "connectuser" , NULL , NULL , 0 ); }
100+ #line 47 "test1.pgc"
101+
102+ { ECPGdisconnect (__LINE__ , "CURRENT" );}
103+ #line 48 "test1.pgc"
110104
111105
112106 /* wrong db */
113107 { ECPGconnect (__LINE__ , 0 , "tcp:postgresql://localhost:55432/nonexistant" , "connectuser" , "connectpw" , NULL , 0 ); }
114- #line 54 "test1.pgc"
108+ #line 51 "test1.pgc"
115109
116110 { ECPGdisconnect (__LINE__ , "CURRENT" );}
117- #line 55 "test1.pgc"
111+ #line 52 "test1.pgc"
118112
119113
120114 /* wrong port */
121115 { ECPGconnect (__LINE__ , 0 , "tcp:postgresql://localhost:0/connectdb" , "connectuser" , "connectpw" , NULL , 0 ); }
122- #line 58 "test1.pgc"
116+ #line 55 "test1.pgc"
123117
124118 /* no disconnect necessary */
125119
126120 /* wrong password */
127121 { ECPGconnect (__LINE__ , 0 , "unix:postgresql://localhost:55432/connectdb" , "connectuser" , "wrongpw" , NULL , 0 ); }
128- #line 62 "test1.pgc"
122+ #line 59 "test1.pgc"
129123
130124 /* no disconnect necessary */
131125
132- /* connect twice */
133- { ECPGconnect (__LINE__ , 0 , "connectdb" , NULL ,NULL , "main" , 0 ); }
134- #line 66 "test1.pgc"
135-
136- { ECPGconnect (__LINE__ , 0 , "connectdb" , NULL ,NULL , "main" , 0 ); }
137- #line 67 "test1.pgc"
138-
139- { ECPGdisconnect (__LINE__ , "main" );}
140- #line 68 "test1.pgc"
141-
142-
143126 return (0 );
144127}
0 commit comments