Skip to content

Commit 4eef745

Browse files
author
Michael Meskes
committed
Cygwin systems seem to have a different error message when trying to connect to port 0. Let's try port 20 instead.
1 parent 0f0d676 commit 4eef745

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/interfaces/ecpg/test/connect/test1.pgc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ exec sql end declare section;
6363
exec sql disconnect;
6464

6565
/* wrong port */
66-
exec sql connect to tcp:postgresql://localhost:0/connectdb user connectuser identified by connectpw;
66+
exec sql connect to tcp:postgresql://localhost:20/connectdb user connectuser identified by connectpw;
6767
/* no disconnect necessary */
6868

6969
/* wrong password */

src/interfaces/ecpg/test/expected/connect-test1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ main(void)
137137

138138

139139
/* wrong port */
140-
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:0/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
140+
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:20/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
141141
#line 66 "test1.pgc"
142142

143143
/* no disconnect necessary */

src/interfaces/ecpg/test/expected/connect-test1.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
6767
[NO_PID]: sqlca: code: -402, state: 08001
6868
[NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'.
6969
[NO_PID]: sqlca: code: -220, state: 08003
70-
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 0 for user connectuser
70+
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 20 for user connectuser
7171
[NO_PID]: sqlca: code: 0, state: 00000
72-
[NO_PID]: connect: could not open database connectdb on localhost port 0 for user connectuser in line 66
72+
[NO_PID]: connect: could not open database connectdb on localhost port 20 for user connectuser in line 66
7373
could not connect to server: Connection refused
7474
Is the server running on host "localhost" and accepting
75-
TCP/IP connections on port 0?
75+
TCP/IP connections on port 20?
7676

7777
[NO_PID]: sqlca: code: 0, state: 00000
7878
[NO_PID]: ecpg_finish: Connection connectdb closed.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy