(config)
| 1648 | |
| 1649 | def _has_pg_extension(self, name): |
| 1650 | def check(config): |
| 1651 | if not against(config, "postgresql"): |
| 1652 | return False |
| 1653 | with config.db.connect() as conn: |
| 1654 | count = conn.exec_driver_sql( |
| 1655 | "SELECT count(*) FROM pg_extension " |
| 1656 | "WHERE extname='%s'" % name |
| 1657 | ).scalar() |
| 1658 | return bool(count) |
| 1659 | |
| 1660 | return only_if(check, "needs %s extension" % name) |
| 1661 |
nothing calls this directly
no test coverage detected