public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andreas 'ads' Scherbaum <[email protected]>
To: [email protected]
Subject: Remove "unsupported version" warning for Greenplum
Date: Mon, 18 Jan 2016 02:44:53 +0100
Message-ID: <[email protected]> (raw)
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>


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


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [text/x-patch] gp-warning.diff (3.1K, 2-gp-warning.diff)
  download | inline diff:
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;


view thread (16+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Remove "unsupported version" warning for Greenplum
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox