Commit 4eef745f authored by Michael Meskes's avatar Michael Meskes

Cygwin systems seem to have a different error message when trying to connect...

Cygwin systems seem to have a different error message when trying to connect to port 0. Let's try port 20 instead.
parent 0f0d6765
...@@ -63,7 +63,7 @@ exec sql end declare section; ...@@ -63,7 +63,7 @@ exec sql end declare section;
exec sql disconnect; exec sql disconnect;
/* wrong port */ /* wrong port */
exec sql connect to tcp:postgresql://localhost:0/connectdb user connectuser identified by connectpw; exec sql connect to tcp:postgresql://localhost:20/connectdb user connectuser identified by connectpw;
/* no disconnect necessary */ /* no disconnect necessary */
/* wrong password */ /* wrong password */
......
...@@ -137,7 +137,7 @@ main(void) ...@@ -137,7 +137,7 @@ main(void)
/* wrong port */ /* wrong port */
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:0/connectdb" , "connectuser" , "connectpw" , NULL, 0); } { ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:20/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
#line 66 "test1.pgc" #line 66 "test1.pgc"
/* no disconnect necessary */ /* no disconnect necessary */
......
...@@ -67,12 +67,12 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT ...@@ -67,12 +67,12 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
[NO_PID]: sqlca: code: -402, state: 08001 [NO_PID]: sqlca: code: -402, state: 08001
[NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'. [NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'.
[NO_PID]: sqlca: code: -220, state: 08003 [NO_PID]: sqlca: code: -220, state: 08003
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 0 for user connectuser [NO_PID]: ECPGconnect: opening database connectdb on localhost port 20 for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: connect: could not open database connectdb on localhost port 0 for user connectuser in line 66 [NO_PID]: connect: could not open database connectdb on localhost port 20 for user connectuser in line 66
could not connect to server: Connection refused could not connect to server: Connection refused
Is the server running on host "localhost" and accepting Is the server running on host "localhost" and accepting
TCP/IP connections on port 0? TCP/IP connections on port 20?
[NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection connectdb closed. [NO_PID]: ecpg_finish: Connection connectdb closed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment