Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4eef745

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 parent0f0d676 commit4eef745

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 port0 for user connectuser
70+
[NO_PID]: ECPGconnect: opening database connectdb on localhost port20 for user connectuser
7171
[NO_PID]: sqlca: code: 0, state: 00000
72-
[NO_PID]: connect: could not open database connectdb on localhost port0 for user connectuser in line 66
72+
[NO_PID]: connect: could not open database connectdb on localhost port20 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 port0?
75+
TCP/IP connections on port20?
7676

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp