On 19.01.2016 16:03, Dave Page wrote:
Your patch won't apply again. I have no idea why - I'm trying to do it
on my Mac, which is a *nix under the hood (they don't use Mac line
endings any more - that was the old Mac OS 9 and earlier from a decade
or so ago iirc). How are you creating them? The normal way is to do
something like:
And how does the attached work? Fresh clone again, only difference is a
warning (not an error) for whitespaces removed.
Regards
--
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..ad47851 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