Re: [pgadmin-hackers] Driver Module
От | Dave Page |
---|---|
Тема | Re: [pgadmin-hackers] Driver Module |
Дата | |
Msg-id | CA+OCxowafvQt7Cp1O=XSHt34Hr0bCjDCy4bnLdO5WPCXE=H9hw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [pgadmin-hackers] Driver Module (George Gelashvili <ggelashvili@pivotal.io>) |
Ответы |
Re: [pgadmin-hackers] Driver Module
|
Список | pgadmin-hackers |
Hi On Wed, Jan 11, 2017 at 10:24 PM, George Gelashvili <ggelashvili@pivotal.io> 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
В списке pgadmin-hackers по дате отправления: