# What are PostgreSQL Templates?

DevFeed: [What are PostgreSQL Templates?](<https://devfeed.tech/articles/what-are-postgresql-templates-515.md>)

Original publisher: [Read original article](<https://supabase.com/blog/postgresql-templates>)

Author: Angelico de los Reyes

Published: 2020-07-09T07:00:00Z

Content type: tutorial

Language: en

Sources: [Supabase Blog](<https://devfeed.tech/sources/supabase-blog.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Template](<https://devfeed.tech/topics/template.md>), [postgresql clusters](<https://devfeed.tech/topics/postgresql-clusters.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [use-cases](<https://devfeed.tech/tags/use-cases.md>)

## AI overview

The article explains PostgreSQL's built-in template databases, template1 and template0, and how they affect newly created databases. It covers customizing template databases, creating and using a separate custom template for different use cases, and the connection limitations of this approach. It also recommends pg_dump when replicating a database while preserving active connections.

## Source excerpt

What are PostgreSQL templates and what are they used for?