My current programming project has me accessing a PostgreSQL database in Python3 using psycopg2 library. Although everything is going well, I am finding there are subtle differences between the open-source PostgreSQL and the EnterpriseDB version (also known as Postgres Plus Advanced Server or PPAS). Thus, I need to be able to determine if a database connection is to a PPAS instance or a regular PostgreSQL instance.
Is there a way to do this via the psycopg2 API or by querying the database?
I suspect there might be a way to do this using SELECT version()
but I am unsure what possible values I might see to indicate which platform I am on.