Cygwin systems seem to have a different error message when trying to connect to port 0. Let's try port 20 instead.

This commit is contained in:
Michael Meskes 2006-09-14 08:46:58 +00:00
parent 0f0d6765ce
commit 4eef745fb1
3 changed files with 5 additions and 5 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -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.