tembo-io / trunk

Package manager and registry for Postgres extensions
PostgreSQL License
231 stars 14 forks source link

PLAT-71: Trunk tells user to `create extension <trunk project>` #683

Closed vrmiguel closed 3 months ago

vrmiguel commented 3 months ago

If the manifest.json doesn't have the extension_name in it (for example, if it was built by a considerably older Trunk version), Trunk could produce outputs such as:

***************************
* POST INSTALLATION STEPS *
***************************

Enable the extension with:
CREATE EXTENSION IF NOT EXISTS postgresml CASCADE;

The above is incorrect, since Postgresml has the pgml extension name. In this PR we propose to use the value for extension_name supplied by the v1 API if not supplied in the manifest.json.

Running trunk install postgresml would, then, result in:

***************************
* POST INSTALLATION STEPS *
***************************

Enable the extension with:
CREATE EXTENSION IF NOT EXISTS pgml CASCADE;