Index: CHANGELOG.txt
===================================================================
RCS file: /projects/pgadmin3/CHANGELOG.txt,v
retrieving revision 1.171.2.4
retrieving revision 1.171.2.5
diff -LCHANGELOG.txt -LCHANGELOG.txt -u -w -r1.171.2.4 -r1.171.2.5
--- CHANGELOG.txt
+++ CHANGELOG.txt
@@ -17,6 +17,7 @@
+ - 2005-03-18 DP 1.2.1 Include the hostname in the connect string for Kerberos support, per Magnus Hagander
- 2005-03-04 DP 1.2.1 Fix aggregate SQL generation per James Prichard
- 2005-02-07 AHP 1.2.1 fix libpq/ssl library detection
- 2005-01-13 DP 1.2.1 fix EXPLICIT CAST sql generation (r: Merlin Moncure)
Index: pgConn.cpp
===================================================================
RCS file: /projects/pgadmin3/src/db/pgConn.cpp,v
retrieving revision 1.60.2.2
retrieving revision 1.60.2.3
diff -Lsrc/db/pgConn.cpp -Lsrc/db/pgConn.cpp -u -w -r1.60.2.2 -r1.60.2.3
--- src/db/pgConn.cpp
+++ src/db/pgConn.cpp
@@ -51,7 +51,7 @@
pgConn::pgConn(const wxString& server, const wxString& database, const wxString& username, const wxString& password, int port, int sslmode, OID oid)
{
wxLogInfo(wxT("Creating pgConn object"));
- wxString msg, hostip;
+ wxString msg, hostip, hostname;
conv = &wxConvLibc;
needColQuoting = false;
@@ -85,7 +85,7 @@
memcpy(&(ipaddr),host->h_addr,host->h_length);
hostip = wxString::FromAscii(inet_ntoa(*((struct in_addr*) host->h_addr_list[0])));
-
+ hostname = server;
}
else
hostip = server;
@@ -94,6 +94,10 @@
// Create the connection string
wxString connstr;
+ if (!hostname.IsEmpty()) {
+ connstr.Append(wxT(" host="));
+ connstr.Append(qtString(hostname));
+ }
if (!server.IsEmpty()) {
connstr.Append(wxT(" hostaddr="));
connstr.Append(qtString(hostip));