Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRWgB-0002Lk-6W for pgadmin-hackers@arkaria.postgresql.org; Thu, 12 Jan 2017 04:07:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cRWgA-0008Dr-Gn for pgadmin-hackers@arkaria.postgresql.org; Thu, 12 Jan 2017 04:07:58 +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_2) (envelope-from ) id 1cRWfw-0007yA-SS for pgadmin-hackers@postgresql.org; Thu, 12 Jan 2017 04:07:44 +0000 Received: from mail-it0-x22b.google.com ([2607:f8b0:4001:c0b::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cRWft-0000FM-2T for pgadmin-hackers@postgresql.org; Thu, 12 Jan 2017 04:07:43 +0000 Received: by mail-it0-x22b.google.com with SMTP id r185so4616990ita.0 for ; Wed, 11 Jan 2017 20:07:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=V6wfRTl9MwkHPE9sl41tFz+sJVANYxdyPz+oo63e8qU=; b=j+CrYAHUEss9w65eJ1h3ittTc7Zk5uxWU9EqIhKij/vEctzE1yzjLAd7LTY34ChzH+ lyofRDXNuMcjtXl5OUP/frFes5Dcw1fALEuTeOAvwPD0AyOwiTOvlMf+ZNsnFdmPzmWT Vczf2C9pFZx9bWSQc4zS4OD560NUB/miI7WKjapDru175jq8z+W1iRWtzBus0whHjOjL Wq4BdJXP52QykGB7iYbiQw96a866EGMlNzEu08jkkBD2BZBW0G47cx/BfhU94Q7NZp05 uhpiei8BvIedAYM0vR6DxxsfhGKw0QJJMmd0q+ioSnNsRe1+/t8zWXyillaMI93BJX2Q /rvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=V6wfRTl9MwkHPE9sl41tFz+sJVANYxdyPz+oo63e8qU=; b=EaEp10//Vbvjmp7toBSs8HK+7plzXAfSecMdRfI0T/2jQ5vmyCovrF9d+uus6wo43O fc8Dh9amFNRhrNpWvwkmNzwAzlEYyv2K+iYeRYs1+TuJvdsz1dlcs7ie7u3WOy/72UgJ ZEqauiEoRzys3iZLRtagkDzc2NP6AwrvZjRdQ9zk6vk/BrLtOoj6z6+5KQdSveR+rGr6 JSgxxpaBT1m4p1DcWvNwOjXpmi4ewbzDvE6BSNn6yDnbFH/5N2rE3nY4/U9/cA3oCk8O axRvk6DMRy5568tcBcy596f9nAlgTAJ0myZk6fTNahgZ9EkS/DgfmV693OanqPN3utmC DVmw== X-Gm-Message-State: AIkVDXLvm/eoZmrU9jCW3DPeIEYBgcrV+16CFkR10ftXFNmTaQMnxwY1M5EQKKlrj0zzG5sjnrH44dowOalfQQ== X-Received: by 10.36.39.6 with SMTP id g6mr11408432ita.94.1484194058844; Wed, 11 Jan 2017 20:07:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.224.198 with HTTP; Wed, 11 Jan 2017 20:07:37 -0800 (PST) In-Reply-To: References: From: Dave Page Date: Thu, 12 Jan 2017 09:37:37 +0530 Message-ID: Subject: Re: Driver Module To: George Gelashvili Cc: "pgadmin-hackers@postgresql.org" , "plumadmin@pivotal.io" , Ashesh Vashi Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -0.2 (/) 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 Hi On Wed, Jan 11, 2017 at 10:24 PM, George Gelashvili wrote: > Hi Dave, > > Thanks for the pointer. > We realized that many of the changes we would need to make for supporting > Greenplum would need to go where there is pg version checking throughout the > code. This is because unlike PPAS which mostly adds additional features, > Greenplum is based on postgres 8.3. Isn't Heikki fixing that for your next release? > It looks like much of the version checking logic is repeated at points where > the features are differentiated by postgres version. > > It might make sense at this point to refactor the way that feature flagging > is done to be a little bit more unified between server types and postgres > versions so that we could for example have logic along the lines of: > > feature_enablement = FeatureEnablement(postgres_flavor, postgres_version) > > #... > > if(feature_enablement.check_internal_triggers ): > # feature call here > > and then in a feature enablement class, reference the various versions and > flavors of postgres. > > Any thoughts on this? I worry that the list of features would end up being huge - we're not just talking about basic things like whether DDL triggers are supported, but the catalog schema (e.g. procpid vs. pid in pg_stat_activity) and small things like whether a particular GUC can be set on a tablespace. Ultimately, you have to do a version check at some point though (unless you're proposing to do something similar to probing the DOM in a browser at runtime). Doesn't GP's version string contain additional info beyond '8.3'? In pgAdmin 3 we had a EdbMinimumVersion(int major, int minor) function in the connection class that basically did: return isEdb && BackendMinimumVersion(x, y); Something like that could check other elements of the GP version number. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers