diff --git a/pgadmin/include/pgAdmin3.h b/pgadmin/include/pgAdmin3.h index 2a56d0f..9259070 100644 --- a/pgadmin/include/pgAdmin3.h +++ b/pgadmin/include/pgAdmin3.h @@ -60,6 +60,10 @@ const short SERVER_MIN_VERSION_N = 0x0804; const wxString SERVER_MIN_VERSION_T = wxT("8.4"); const short SERVER_MAX_VERSION_N = 0x0905; const wxString SERVER_MAX_VERSION_T = wxT("9.5"); +const short GP_SERVER_VERSION_N = 0x0802; +const wxString GP_SERVER_VERSION_T = wxT("8.2"); +const short GP_SERVER_MAX_VERSION_N = 0x0802; +const wxString GP_SERVER_MAX_VERSION_T = wxT("8.2"); // The registry file #ifndef __WXMSW__ diff --git a/pgadmin/schema/pgServer.cpp b/pgadmin/schema/pgServer.cpp index d60920d..9be09d0 100644 --- a/pgadmin/schema/pgServer.cpp +++ b/pgadmin/schema/pgServer.cpp @@ -835,14 +835,29 @@ int pgServer::Connect(frmMain *form, bool askPassword, const wxString &pwd, bool dbOid = conn->GetDbOid(); // Check the server version - if (!(conn->BackendMinimumVersion(SERVER_MIN_VERSION_N >> 8, SERVER_MIN_VERSION_N & 0x00FF)) || - (conn->BackendMinimumVersion(SERVER_MAX_VERSION_N >> 8, (SERVER_MAX_VERSION_N & 0x00FF) + 1))) + if (conn->GetIsGreenplum()) { - wxLogWarning(_("The server you are connecting to is not a version that is supported by this release of %s.\n\n%s may not function as expected.\n\nSupported server versions are %s to %s."), - appearanceFactory->GetLongAppName().c_str(), - appearanceFactory->GetLongAppName().c_str(), - wxString(SERVER_MIN_VERSION_T).c_str(), - wxString(SERVER_MAX_VERSION_T).c_str()); + if (!(conn->BackendMinimumVersion(GP_SERVER_MIN_VERSION_N >> 8, GP_SERVER_MIN_VERSION_N & 0x00FF)) || + (conn->BackendMinimumVersion(GP_SERVER_MAX_VERSION_N >> 8, (GP_SERVER_MAX_VERSION_N & 0x00FF) + 1))) + { + wxLogWarning(_("The Greenplum server you are connecting to is not a version that is supported by this release of %s.\n\n%s may not function as expected.\n\nSupported server versions are %s to %s."), + appearanceFactory->GetLongAppName().c_str(), + appearanceFactory->GetLongAppName().c_str(), + wxString(GP_SERVER_MIN_VERSION_T).c_str(), + wxString(GP_SERVER_MAX_VERSION_T).c_str()); + } + } + else + { + if (!(conn->BackendMinimumVersion(SERVER_MIN_VERSION_N >> 8, SERVER_MIN_VERSION_N & 0x00FF)) || + (conn->BackendMinimumVersion(SERVER_MAX_VERSION_N >> 8, (SERVER_MAX_VERSION_N & 0x00FF) + 1))) + { + wxLogWarning(_("The server you are connecting to is not a version that is supported by this release of %s.\n\n%s may not function as expected.\n\nSupported server versions are %s to %s."), + appearanceFactory->GetLongAppName().c_str(), + appearanceFactory->GetLongAppName().c_str(), + wxString(SERVER_MIN_VERSION_T).c_str(), + wxString(SERVER_MAX_VERSION_T).c_str()); + } } connected = true;