Hello,
we tested pgAdminIII 1.22 internally and found that it works sufficient
with Greenplum. A few minor problems are identified and we plan to work
on them as well, but nothing serious. We however know that there are a
number more serious problems with HAWQ (SQL on Hadoop), we plan to work
on this as well.
As a first step, attached is a patch which removes the "unsupported
version" warning for Greenplum. The patch copies a bit infrastructure
and prepares us to support later versions of Greenplum when we bump our
version number after merging with later PostgreSQL versions. One
remaining question is if the supported versions should stay in
pgConn.cpp or move to pgAdmin3.h.
Thank you,
--
Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project
diff --git a/pgadmin/schema/pgServer.cpp b/pgadmin/schema/pgServer.cpp
index b263f7c..259da73 100644
--- a/pgadmin/schema/pgServer.cpp
+++ b/pgadmin/schema/pgServer.cpp
@@ -835,14 +835,47 @@ 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());
+ // Check for Greenplum specific version
+ // Greenplum always shows PG version "8.2.15" for now
+ // this might change once the merge with recent PG versions makes progress
+ // therefore also check for the max version
+ const short GP_MIN_VERSION_N = 0x0802;
+ const wxString GP_MIN_VERSION_T = wxT("8.2");
+ const short GP_MAX_VERSION_N = 0x0802;
+ const wxString GP_MAX_VERSION_T = wxT("8.2");
+ if (!(conn->BackendMinimumVersion(GP_MIN_VERSION_N >> 8, GP_MIN_VERSION_N & 0x00FF)) ||
+ (conn->BackendMinimumVersion(GP_MAX_VERSION_N >> 8, (GP_MAX_VERSION_N & 0x00FF) + 1)))
+ {
+ if (GP_MIN_VERSION_N == GP_MAX_VERSION_N)
+ {
+ 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 version is %s."),
+ appearanceFactory->GetLongAppName().c_str(),
+ appearanceFactory->GetLongAppName().c_str(),
+ wxString(GP_MIN_VERSION_T).c_str());
+ }
+ else
+ {
+ 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(GP_MIN_VERSION_T).c_str(),
+ wxString(GP_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;
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers