HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

What does "unpackaged" mean in PostgreSQL extensions?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqlwhatextensionsunpackagedmeandoes

Problem

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?

Solution

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.

Context

StackExchange Database Administrators Q#58183, answer score: 4

Revisions (0)

No revisions yet.