@@ -27,118 +27,101 @@ main(void)
27
27
/* exec sql begin declare section */
28
28
29
29
30
-
31
30
32
31
#line 16 "test1.pgc"
33
32
char db [ 200 ] ;
34
33
35
34
#line 17 "test1.pgc"
36
- char id [ 200 ] ;
37
-
38
- #line 18 "test1.pgc"
39
35
char pw [ 200 ] ;
40
36
/* exec sql end declare section */
41
- #line 19 "test1.pgc"
37
+ #line 18 "test1.pgc"
42
38
43
39
44
40
ECPGdebug (1 , stderr );
45
41
46
42
{ ECPGconnect (__LINE__ , 0 , "connectdb" , NULL ,NULL , "main" , 0 ); }
47
- #line 23 "test1.pgc"
43
+ #line 22 "test1.pgc"
48
44
49
45
{ 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"
51
47
52
48
{ ECPGdisconnect (__LINE__ , "CURRENT" );}
53
- #line 25 "test1.pgc"
49
+ #line 24 "test1.pgc"
54
50
/* <-- "main" not specified */
55
51
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
-
65
52
{ ECPGconnect (__LINE__ , 0 , "connectdb@localhost" , NULL ,NULL , "main" , 0 ); }
66
- #line 32 "test1.pgc"
53
+ #line 26 "test1.pgc"
67
54
68
55
{ ECPGdisconnect (__LINE__ , "main" );}
69
- #line 33 "test1.pgc"
56
+ #line 27 "test1.pgc"
70
57
71
58
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"
74
61
75
62
{ ECPGdisconnect (__LINE__ , "main" );}
76
- #line 36 "test1.pgc"
63
+ #line 30 "test1.pgc"
77
64
78
65
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"
81
68
82
69
{ ECPGdisconnect (__LINE__ , "main" );}
83
- #line 39 "test1.pgc"
70
+ #line 33 "test1.pgc"
84
71
85
72
86
73
{ ECPGconnect (__LINE__ , 0 , "tcp:postgresql://localhost:55432/connectdb" , "connectuser" , "connectpw" , NULL , 0 ); }
87
- #line 41 "test1.pgc"
74
+ #line 35 "test1.pgc"
88
75
89
76
{ ECPGdisconnect (__LINE__ , "nonexistant" );}
90
- #line 42 "test1.pgc"
77
+ #line 36 "test1.pgc"
91
78
92
79
{ ECPGdisconnect (__LINE__ , "CURRENT" );}
93
- #line 43 "test1.pgc"
80
+ #line 37 "test1.pgc"
94
81
95
82
96
83
strcpy (pw , "connectpw" );
97
84
strcpy (db , "tcp:postgresql://localhost:55432/connectdb" );
98
85
{ ECPGconnect (__LINE__ , 0 , db , "connectuser" , pw , NULL , 0 ); }
99
- #line 47 "test1.pgc"
86
+ #line 41 "test1.pgc"
100
87
101
88
{ ECPGdisconnect (__LINE__ , "CURRENT" );}
102
- #line 48 "test1.pgc"
89
+ #line 42 "test1.pgc"
103
90
104
91
105
92
{ ECPGconnect (__LINE__ , 0 , "unix:postgresql://localhost:55432/connectdb" , "connectuser" , "connectpw" , NULL , 0 ); }
106
- #line 50 "test1.pgc"
93
+ #line 44 "test1.pgc"
107
94
108
95
{ 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"
110
104
111
105
112
106
/* wrong db */
113
107
{ ECPGconnect (__LINE__ , 0 , "tcp:postgresql://localhost:55432/nonexistant" , "connectuser" , "connectpw" , NULL , 0 ); }
114
- #line 54 "test1.pgc"
108
+ #line 51 "test1.pgc"
115
109
116
110
{ ECPGdisconnect (__LINE__ , "CURRENT" );}
117
- #line 55 "test1.pgc"
111
+ #line 52 "test1.pgc"
118
112
119
113
120
114
/* wrong port */
121
115
{ ECPGconnect (__LINE__ , 0 , "tcp:postgresql://localhost:0/connectdb" , "connectuser" , "connectpw" , NULL , 0 ); }
122
- #line 58 "test1.pgc"
116
+ #line 55 "test1.pgc"
123
117
124
118
/* no disconnect necessary */
125
119
126
120
/* wrong password */
127
121
{ ECPGconnect (__LINE__ , 0 , "unix:postgresql://localhost:55432/connectdb" , "connectuser" , "wrongpw" , NULL , 0 ); }
128
- #line 62 "test1.pgc"
122
+ #line 59 "test1.pgc"
129
123
130
124
/* no disconnect necessary */
131
125
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
-
143
126
return (0 );
144
127
}
0 commit comments