|
7 | 7 | * |
8 | 8 | * |
9 | 9 | * IDENTIFICATION |
10 | | - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.86 1998/10/14 05:31:48 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.87 1999/01/17 03:37:19 tgl Exp $ |
11 | 11 | * |
12 | 12 | *------------------------------------------------------------------------- |
13 | 13 | */ |
@@ -584,9 +584,12 @@ connectDB(PGconn *conn) |
584 | 584 | if (connect(conn->sock,&conn->raddr.sa,conn->raddr_len)<0) |
585 | 585 | { |
586 | 586 | (void)sprintf(conn->errorMessage, |
587 | | -"connectDB() failed: Is the postmaster running and accepting%s connections at '%s' on port '%s'?\n", |
588 | | -conn->pghost ?" TCP/IP(with -i)" :"", |
589 | | -conn->pghost ?conn->pghost :"UNIX Socket", |
| 587 | +"connectDB() -- connect() failed: %s\n" |
| 588 | +"Is the postmaster running%s at '%s' and accepting connections on %s '%s'?\n", |
| 589 | +strerror(errno), |
| 590 | + (family==AF_INET) ?" (with -i)" :"", |
| 591 | +conn->pghost ?conn->pghost :"localhost", |
| 592 | + (family==AF_INET) ?"TCP/IP port" :"Unix socket", |
590 | 593 | conn->pgport); |
591 | 594 | gotoconnect_errReturn; |
592 | 595 | } |
|