Index: TODO.txt =================================================================== RCS file: /projects/pgadmin3/TODO.txt,v retrieving revision 1.131 retrieving revision 1.132 diff -LTODO.txt -LTODO.txt -u -w -r1.131 -r1.132 --- TODO.txt +++ TODO.txt @@ -18,7 +18,6 @@
-The address is the IP address of the machine to contact, or the full -qualified domain name. The description is a text to identify the +The address is the IP address of the machine to contact, or the fully +qualified domain name. On Unix based systems the address field may +be left blank to use the default PostgreSQL Unix Domain Socket on +the local machine, or be set to an alternate path containing a PostgreSQL +socket. If a path is entered, it must begin with a "/". +
++The description is a text to identify the server in the pgAdmin tree.
Index: pgConn.cpp =================================================================== RCS file: /projects/pgadmin3/src/db/pgConn.cpp,v retrieving revision 1.68 retrieving revision 1.69 diff -Lsrc/db/pgConn.cpp -Lsrc/db/pgConn.cpp -u -w -r1.68 -r1.69 --- src/db/pgConn.cpp +++ src/db/pgConn.cpp @@ -71,7 +71,10 @@ unsigned long ipaddr; #endif - +#ifndef __WXMSW__ + if (!(server.IsEmpty() || server.StartsWith(wxT("/")))) + { +#endif addr = inet_addr(server.ToAscii()); if (addr == INADDR_NONE) // szServer is not an IP address { @@ -89,6 +92,12 @@ } else hostip = server; +#ifndef __WXMSW__ + } + else + hostname = server; +#endif + wxLogInfo(wxT("Server name: %s (resolved to: %s)"), server.c_str(), hostip.c_str()); @@ -98,7 +107,7 @@ connstr.Append(wxT(" host=")); connstr.Append(qtString(hostname)); } - if (!server.IsEmpty()) { + if (!hostip.IsEmpty()) { connstr.Append(wxT(" hostaddr=")); connstr.Append(qtString(hostip)); } Index: dlgServer.cpp =================================================================== RCS file: /projects/pgadmin3/src/ui/dlgServer.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -Lsrc/ui/dlgServer.cpp -Lsrc/ui/dlgServer.cpp -u -w -r1.16 -r1.17 --- src/ui/dlgServer.cpp +++ src/ui/dlgServer.cpp @@ -240,7 +240,9 @@ || chkNeedPwd->GetValue() != server->GetNeedPwd(); } +#ifdef __WXMSW__ CheckValid(enable, !name.IsEmpty(), _("Please specify address.")); +#endif CheckValid(enable, !txtDescription->GetValue().IsEmpty(), _("Please specify description.")); CheckValid(enable, StrToLong(txtPort->GetValue()) > 0, _("Please specify port.")); CheckValid(enable, !txtUsername->GetValue().IsEmpty(), _("Please specify user name"));