Introducing extensions
SQL is a declarative language that allows you to create and manipulate objects, as well as data. You can group SQL statements into scripts so that you can run the scripts in a more predictable and reproducible way. However, such scripts are seen by PostgreSQL as a sequence of unrelated commands, that is, you are responsible for correlating such commands into appropriate scripts. Things get even worse when you have to deal with foreign programming languages (e.g., PL/Perl and other not SQL-based languages) or binary libraries; the cluster knows nothing about your aims or how the objects are related to each other. Luckily, extensions help you get order out of chaos.
An extension is a packaged set of files that can be installed in the cluster in order to provide more functionalities, that is, to “extend” the current cluster set of features. Unlike scripts, extensions are managed strictly through specific commands that install, deploy, load, and...