Re: Driver Module

From: George Gelashvili <ggelashvili(at)pivotal(dot)io>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: "pgadmin-hackers(at)postgresql(dot)org" <pgadmin-hackers(at)postgresql(dot)org>, "plumadmin(at)pivotal(dot)io" <plumadmin(at)pivotal(dot)io>, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Subject: Re: Driver Module
Date: 2017-01-11 16:54:15
Message-ID: CAHowoHY+9h_=wpkGS3DUhey9ua+OVee6X+4OmifMH9cU6KiCug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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.

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?

Thanks,
Tira and George

On Sun, Jan 8, 2017 at 4:57 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Friday, January 6, 2017, George Gelashvili <ggelashvili(at)pivotal(dot)io>
> wrote:
>
>> Hi there,
>>
>> We are working on connecting Greenplum to pgAdmin4. Currently we are
>> exploring how modules work in pgAdmin. In an earlier off-thread email it
>> was suggested we look at "the EDB PPAS" as an example of a driver class. We
>> are not entirely clear on what that means.
>>
>> We found:
>> - the BaseDriver in web/pgadmin/utils/driver, documented:
>> https://www.pgadmin.org/docs4/1.x/code_snippets.html?highlig
>> ht=driver#basedriver
>> - things that look EDB-related in web/pgadmin/utils/driver/psyco
>> pg2/__init__.py
>>
>> Is it a good idea to keep looking for EDB PPAS as an example of a driver?
>> Does anyone know exactly where it lives?
>>
>
> I believe 99% of it is simply inherited from the base driver, and (some
> of?) the rest of it is in web/pgadmin/browser/server_
> groups/servers/ppas.py.
>
> Ashesh, can you help here? You know that code infinitely better than I do.
>
> Thanks.
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Josh Berkus 2017-01-12 02:12:52 Building server without Apache
Previous Message Dave Page 2017-01-11 13:19:43 Re: PATCH: RM# 1679 - Background process for "restore" not reporting status back to pgAdmin