Default database named postgres on Postgresql server

前端 未结 5 1400
执念已碎
执念已碎 2020-12-12 17:41

Apparently there is a database \"postgres\" that is created by default on each postgresql server installation. Can anyone tell me or point me to documentation what it is use

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-12 18:17

    There is also the database template0, your safety net when you screw up all others.

    1. postgres is your default database to connect with.
    2. template1 is your default for creating new databases, these are created just like template1
    3. template0 is usefull when template1 is corrupted (wrong settings etc.) and you don't want to spend a lot of time to fix this. Just drop template1 and create a new template1 using the database template0.

提交回复
热议问题