New relation requests do not contain extensions information but “data_interfaces” library which implements new relation should have “is_postgresql_plugin_enabled” function. This function returns True or False depending if the extension is installed and configured.
Created the new method and add a local import to psycopg to avoid requiring that application charms not using the new method need to install psycopg as a dependency.
Issue
Jira ticket: DPE-1373
As an juju admin, I should be able to run:
juju relate postgresql-k8s:postgresql_client TODO_charmname:postgresql_client
New relation requests do not contain extensions information but “data_interfaces” library which implements new relation should have “is_postgresql_plugin_enabled” function. This function returns True or False depending if the extension is installed and configured.
(with new relation) the application charm expects to set blocked status to forcing users to enable extension manually through config options (https://github.com/canonical/postgresql-operator/pull/139).
Solution
Created the new method and add a local import to psycopg to avoid requiring that application charms not using the new method need to install psycopg as a dependency.
Added unit and integration tests.