I've read the docs and a few blog postings, but I still don't get what the "unpackaged" tag in an extension file name is for.

When would I use it and not use it?


1 Answer 1


If you had, say, a PostgreSQL 9.0 database using hstore, you would've loaded the hstore support by running the contrib's .sql script.

It was a major pain to dump and reload such databases, and especially to upgrade the contrib to a new version.

When extensions were introduced, there was a need to be able to convert the "unpackaged" contrib, i.e one loaded from an sql script, into an extension that could be recognised by the system, versioned, and upgraded using the extension control system.

That's what from unpackaged is for. It registers an already-installed extension that was set up manually from a script.

For more detail, see the documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.