Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aL5aq-0005tK-KM for pgadmin-hackers@arkaria.postgresql.org; Mon, 18 Jan 2016 08:55:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aL5ap-0001Pi-M8 for pgadmin-hackers@arkaria.postgresql.org; Mon, 18 Jan 2016 08:55:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aKysP-0002Zi-0o for pgadmin-hackers@postgresql.org; Mon, 18 Jan 2016 01:45:01 +0000 Received: from palladium.wars-nicht.de ([89.238.64.91] helo=polonium.wars-nicht.de) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aKysL-00020I-JA for pgadmin-hackers@postgresql.org; Mon, 18 Jan 2016 01:45:00 +0000 Received: from localhost (localhost [127.0.0.1]) by polonium.wars-nicht.de (Postfix) with ESMTP id 76E91114037 for ; Mon, 18 Jan 2016 02:44:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at polonium X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from polonium.wars-nicht.de ([127.0.0.1]) by localhost (polonium.wars-nicht.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id syjYGpoe3gkH for ; Mon, 18 Jan 2016 02:44:54 +0100 (CET) Received: from diamond.wars-nicht.de (dslb-088-075-184-086.088.075.pools.vodafone-ip.de [88.75.184.86]) by polonium.wars-nicht.de (Postfix) with ESMTPSA id AE664114036 for ; Mon, 18 Jan 2016 02:44:54 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by diamond.wars-nicht.de (Postfix) with ESMTP id 0F7E81BE016F for ; Mon, 18 Jan 2016 02:44:54 +0100 (CET) To: pgadmin-hackers@postgresql.org From: Andreas 'ads' Scherbaum Subject: Remove "unsupported version" warning for Greenplum Message-ID: <569C4395.4080603@wars-nicht.de> Date: Mon, 18 Jan 2016 02:44:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030700090502010407010300" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org This is a multi-part message in MIME format. --------------030700090502010407010300 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------030700090502010407010300 Content-Type: text/x-patch; name="gp-warning.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gp-warning.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; --------------030700090502010407010300 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --------------030700090502010407010300--