Skip to content
Snippets Groups Projects
Commit 4eef745f authored by Michael Meskes's avatar Michael Meskes
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ exec sql end declare section;
exec sql disconnect;
/* 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 */
/* wrong password */
......
......@@ -137,7 +137,7 @@ main(void)
/* 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"
/* no disconnect necessary */
......
......@@ -67,12 +67,12 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
[NO_PID]: sqlca: code: -402, state: 08001
[NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'.
[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]: 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
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]: ecpg_finish: Connection connectdb closed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment