(config)
| 1577 | |
| 1578 | def _has_pg_extension(self, name): |
| 1579 | def check(config): |
| 1580 | if not against(config, "postgresql"): |
| 1581 | return False |
| 1582 | with config.db.connect() as conn: |
| 1583 | count = conn.exec_driver_sql( |
| 1584 | "SELECT count(*) FROM pg_extension " |
| 1585 | "WHERE extname='%s'" % name |
| 1586 | ).scalar() |
| 1587 | return bool(count) |
| 1588 | |
| 1589 | return only_if(check, "needs %s extension" % name) |
| 1590 |
nothing calls this directly
no test coverage detected