# Extensions Templates

DevFeed: [Extensions Templates](<https://devfeed.tech/articles/extensions-templates-34487.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2013/01/extensions-templates/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2013-01-08T16:53:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Extension](<https://devfeed.tech/topics/extension.md>), [Template](<https://devfeed.tech/topics/template.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [upgrade](<https://devfeed.tech/topics/upgrade.md>)

Tags: [extensions](<https://devfeed.tech/tags/extensions.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [practical](<https://devfeed.tech/tags/practical.md>), [templates](<https://devfeed.tech/tags/templates.md>), [upgrade](<https://devfeed.tech/tags/upgrade.md>)

## AI overview

This tutorial presents a PostgreSQL patch that adds templates for extensions. Templates store an extension's script and properties in system catalogs, allowing installation from the catalogs instead of the server filesystem. It also demonstrates preparing and testing extension upgrades, including automatic upgrade paths, with fewer required privileges.

## Source excerpt

In a recent article titled Inline Extensions we detailed the problem of how to distribute an extension's package to a remote server without having access to its file system at all. The solution to that problem is non trivial, let's say. But thanks to the awesome PostgreSQL Community we finaly have some practical ideas on how to address the problem as discussed on pgsql-hackers, our development mailing list. *PostgreSQL is first an Awesome Community* The solution we talked about is to use templates, and so I've been working on a patch to bring templates for extensions to PostgreSQL. As we're talking about 3 new system catalogs, that's a big patch in term of lines of code. In term of features though, it's quite an easy one.