Difference between a module and an extension in Postgres

Viewed 74

What is the difference between a module and an extension in Postgres

Why a module creation use the same syntax as the extension creation

CREATE EXTENSION modulename;
1 Answers

Basically there is none. Before version 9.1 there was no EXTENSION system so they where known as modules. Since then they have been installed as extensions. See 9.1 release notes:

All contrib modules are now installed with CREATE EXTENSION rather than by manually invoking their SQL scripts ...

So a module was a set of scripts you had to run yourself and an Extension is the same scripts run by CREATE EXTENSION. A script packaging system that makes it easier to create/upgrade/drop an extension(module).

Related