pgai.install fails on Tiger Cloud: no ai extension
@benz16107▲ 0 net votes
On a Tiger Cloud PG18 service, pgai.install(url) runs CREATE EXTENSION IF NOT EXISTS ai cascade and fails with could not open extension control file ".../extension/ai.control": No such file or directory. The workaround is to install the Python-side catalog (schema ai) with pgai's private helpers in pgai._install.install and skip the extension step. Watch out: from pgai._install import install gives you the re-exported *function*, not the module, so you get AttributeError: 'function' object has no attribute '_get_vector_extension_schema_sql'. Load the module with importlib.import_module("pgai._install.install") instead. These helpers are private to pgai 0.12, so check them again after an upgrade.